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

Default analyzer deserialization to custom type when unspecified #1033

Merged

Conversation

Xtansia
Copy link
Collaborator

@Xtansia Xtansia commented Jun 19, 2024

Description

Fixes an error when deserializing an analyzer without an explicit type specified:

JsonParsingException: Property 'type' not found
    at org.opensearch.client.json.JsonpUtils.lookAheadFieldValue(JsonpUtils.java:145)

The server requires type to be specified unless tokenizer is specified then type: custom is assumed, thus any analyzer without type specified is a custom analyzer.

Issues Resolved

Fixes #1032

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.

Signed-off-by: Thomas Farr <[email protected]>
@Xtansia Xtansia added the backport 2.x Backport to 2.x branch label Jun 19, 2024
Signed-off-by: Thomas Farr <[email protected]>
@dblock dblock merged commit 80dc741 into opensearch-project:main Jun 19, 2024
54 checks passed
@reta
Copy link
Collaborator

reta commented Jun 19, 2024

@Xtansia I think the backport worklfows are broken at the moment, could you please do 2.x manually? thank you.

@Xtansia Xtansia deleted the fix/custom-analyzer-deserialization branch June 19, 2024 20:52
Xtansia added a commit to Xtansia/opensearch-java that referenced this pull request Jun 19, 2024
…nsearch-project#1033)

* Default analyzer deserialization to custom type when unspecified

Signed-off-by: Thomas Farr <[email protected]>

* Add changelog

Signed-off-by: Thomas Farr <[email protected]>

* Fix for java8

Signed-off-by: Thomas Farr <[email protected]>

---------

Signed-off-by: Thomas Farr <[email protected]>
(cherry picked from commit 80dc741)
reta pushed a commit that referenced this pull request Jun 19, 2024
…) (#1034)

* Default analyzer deserialization to custom type when unspecified

Signed-off-by: Thomas Farr <[email protected]>

* Add changelog

Signed-off-by: Thomas Farr <[email protected]>

* Fix for java8

Signed-off-by: Thomas Farr <[email protected]>

---------

Signed-off-by: Thomas Farr <[email protected]>
(cherry picked from commit 80dc741)
@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.

[BUG] Deserializing a custom analyzer without type specified fails
3 participants