Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename _toQuery() to toQuery() #760

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

channel-dante
Copy link
Contributor

Description

  • Add toQuery() method with the same logic as _toQuery() in Query and QueryVariant
  • add deprecated annotation on _toQuery() method

Issues Resolved

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@channel-dante
Copy link
Contributor Author

channel-dante commented Dec 7, 2023

Are there any plans to support version 1.x with this code(or any others)? If so, please tell me the appropriate branch and I will do the same work there.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some small annoying asks :)

This could be a good opportunity to use toQuery in a (new) sample.

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -39,8 +39,12 @@ public interface QueryVariant {

Query.Kind _queryKind();

@Deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we implement this one in terms of the other so we don't duplicate code? The JIT will optimize it away anyway.

Copy link
Contributor Author

@channel-dante channel-dante Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen it being used elsewhere in code from this repository. The intention was to provide reference for internal code writers. I think it would be okay to remove it if you don't want it.

@dblock
Copy link
Member

dblock commented Dec 7, 2023

Are there any plans to support version 1.x with this code(or any others)? If so, please tell me the appropriate branch and I will do the same work there.

We'll backport this to 2.x, but I think 1.x is now in security patch maintenance mode only and generally with deprecations we deprecate and remove in the next major.

@dblock dblock added the backport 2.x Backport to 2.x branch label Dec 7, 2023
Signed-off-by: channel-dante <dante@channel.io>
Signed-off-by: channel-dante <dante@channel.io>
Signed-off-by: channel-dante <dante@channel.io>
@@ -36,13 +36,13 @@ This section is for maintaining a changelog for all breaking changes for the cli
### Added
- Added support for icu_collation_keyword type ([#725](https://github.com/opensearch-project/opensearch-java/pull/725))
- Added support for flat_object field property ([#735](https://github.com/opensearch-project/opensearch-java/pull/735))

- Added toQuery method in Query and QueryVariant ([#760](https://github.com/opensearch-project/opensearch-java/pull/760)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. If you're bored and care about my nits I would quote all methods ;)

@dblock dblock merged commit b50fdb8 into opensearch-project:main Dec 8, 2023
44 checks passed
@channel-dante channel-dante deleted the rename-toQuery branch December 11, 2023 08:22
channel-dante added a commit to channel-dante/opensearch-java that referenced this pull request Jan 4, 2024
* rename _toQuery() to toQuery()

Signed-off-by: channel-dante <dante@channel.io>

* update CHANGELOG.md

Signed-off-by: channel-dante <dante@channel.io>

* update CHANGELOG.md

Signed-off-by: channel-dante <dante@channel.io>

---------

Signed-off-by: channel-dante <dante@channel.io>

(cherry picked from commit b50fdb8)
Signed-off-by: channel-dante <dante@channel.io>
dblock pushed a commit that referenced this pull request Jan 4, 2024
* rename _toQuery() to toQuery()



* update CHANGELOG.md



* update CHANGELOG.md



---------



(cherry picked from commit b50fdb8)

Signed-off-by: channel-dante <dante@channel.io>
@BrendonFaleiro BrendonFaleiro mentioned this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants