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 normalizer deserialization to custom type when unspecified #1111

Merged

Conversation

Blomex
Copy link
Contributor

@Blomex Blomex commented Jul 25, 2024

Description

Fixes an error when deserializing a normalizer 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 normalizer without type specified is a custom analyzer.

Issues Resolved

Fixes #1110

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: beniamin.jedrychowsk <beniamin.jedrychowski@transatel.com>
@Blomex Blomex force-pushed the fix/custom-normalizer-deserialization branch from 4736038 to 10f2928 Compare July 25, 2024 16:03
Signed-off-by: beniamin.jedrychowsk <beniamin.jedrychowski@transatel.com>
Copy link
Collaborator

@Xtansia Xtansia left a comment

Choose a reason for hiding this comment

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

Changes look good, just a minor nitpick about CHANGELOG formatting

CHANGELOG.md Outdated Show resolved Hide resolved
fixed changelog formatting

Co-authored-by: Thomas Farr <xtansia@xtansia.com>
Signed-off-by: Beniamin Jędrychowski <beniamin.jedrychowski@transatel.com>
@Xtansia Xtansia merged commit 905aa34 into opensearch-project:main Jul 29, 2024
56 checks passed
@Xtansia Xtansia added the backport 2.x Backport to 2.x branch label Jul 29, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 29, 2024
…1111)

* Default normalizer deserialization to custom type when unspecified

Signed-off-by: beniamin.jedrychowsk <beniamin.jedrychowski@transatel.com>

* fix style

Signed-off-by: beniamin.jedrychowsk <beniamin.jedrychowski@transatel.com>

* Update CHANGELOG.md

fixed changelog formatting

Co-authored-by: Thomas Farr <xtansia@xtansia.com>
Signed-off-by: Beniamin Jędrychowski <beniamin.jedrychowski@transatel.com>

---------

Signed-off-by: beniamin.jedrychowsk <beniamin.jedrychowski@transatel.com>
Signed-off-by: Beniamin Jędrychowski <beniamin.jedrychowski@transatel.com>
Co-authored-by: Thomas Farr <xtansia@xtansia.com>
(cherry picked from commit 905aa34)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@Xtansia
Copy link
Collaborator

Xtansia commented Jul 29, 2024

Thanks @Blomex!

Xtansia added a commit that referenced this pull request Jul 29, 2024
…1111) (#1114)

* Default normalizer deserialization to custom type when unspecified



* fix style



* Update CHANGELOG.md

fixed changelog formatting




---------




(cherry picked from commit 905aa34)

Signed-off-by: beniamin.jedrychowsk <beniamin.jedrychowski@transatel.com>
Signed-off-by: Beniamin Jędrychowski <beniamin.jedrychowski@transatel.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Thomas Farr <xtansia@xtansia.com>
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 normalizer without type specified fails
2 participants