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

[Remove] Type from Percolate query API #2490

Merged

Conversation

dreamer-89
Copy link
Member

Signed-off-by: Suraj Singh [email protected]

Description

Remove types from percolate query API

Related: #1940

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.

@dreamer-89 dreamer-89 requested a review from a team as a code owner March 16, 2022 23:09
indexedDocumentType = in.readOptionalString();
if (in.getVersion().before(Version.V_2_0_0)) {
String indexedDocumentType = in.readOptionalString();
assert indexedDocumentType == null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this assertion needed? readOptionalString assumes null value but not necessarily

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you @reta for the comment. Typeless version of this query in 7.x is represented by a null documentType and indexedDocumentType.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of assert do we want to throw IllegalArgumentException since assertions could be disabled? (this is why we did it in other PRs so it would be consistent with those serialization methods)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @nknize for the comment. I will replace assertion with throw IllegalArgumentException.

@dreamer-89 dreamer-89 force-pushed the remove-type-percolate-query branch from 0741191 to 4a7618a Compare March 16, 2022 23:36
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 074119148fcde0afe467806f39559cf58870e148
Log 3460

Reports 3460

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 4a7618a95382fb8f4669a74eda372d41edaff633
Log 3464

Reports 3464

@dreamer-89 dreamer-89 force-pushed the remove-type-percolate-query branch from 4a7618a to d61b06a Compare March 17, 2022 16:15
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success d61b06a
Log 3491

Reports 3491

Copy link
Collaborator

@tlfeng tlfeng left a comment

Choose a reason for hiding this comment

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

Looks good! 🎉

@dreamer-89 dreamer-89 merged commit 9f83dea into opensearch-project:main Mar 18, 2022
@dreamer-89 dreamer-89 added v2.0.0 Version 2.0.0 non-issue bugs / unexpected behaviors that end up non issues; audit trail simple changes that aren't issues >breaking Identifies a breaking change. Indexing & Search labels Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking Identifies a breaking change. Indexing & Search non-issue bugs / unexpected behaviors that end up non issues; audit trail simple changes that aren't issues v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants