-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Correctly apply field path to JSON processor when adding contents to document root #135479
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
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @jbaiera, I've created a changelog YAML for you. |
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/JsonProcessor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I agree with @joegallo 's comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM besides my little comment. I'm shocked that this never came up before now! Good fix, @jbaiera.
This reverts commit 990e24c.
…document root (elastic#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]>
…document root (elastic#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]>
…document root (elastic#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]>
…document root (elastic#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]>
…ts to document root (#135479) (#135498) * Correctly apply field path to JSON processor when adding contents to document root (#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]> * Remove missing test util --------- Co-authored-by: Joe Gallo <[email protected]>
…nts to document root (#135479) (#135495) * Correctly apply field path to JSON processor when adding contents to document root (#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]> * Remove missing test util --------- Co-authored-by: Joe Gallo <[email protected]>
…nts to document root (#135479) (#135497) * Correctly apply field path to JSON processor when adding contents to document root (#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]> * Remove missing test util --------- Co-authored-by: Joe Gallo <[email protected]>
…ts to document root (#135479) (#135496) * Correctly apply field path to JSON processor when adding contents to document root (#135479) Processor now correctly uses ingest document methods to obtain field data. --------- Co-authored-by: Joe Gallo <[email protected]> * Remove missing test util --------- Co-authored-by: Joe Gallo <[email protected]>
The JSON processor has an option that merges the contents of a parsed json string to the root of the document. When operating in this way, the logic was simply gathering the json string directly from the root of the document. This means that nested fields would not be readable. This is likely because in painless, the exact same functionality is exposed as a built in processor function. In painless, field traversal can be done outside of the processor logic. When calling the method, it will add the contents to whichever map is provided. This is working as expected and should not change. When running in the ingest node, the processor handles all field lookups from the document. This is where the fix was applied.
Fixes: #135170
Since this is a long standing bug, I will try and get a backport to the 8.19 branch as well.