-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Parse the contents of dynamic objects for [subobjects:false] #117762
Conversation
Hi @kkrik-es, I've created a changelog YAML for you. |
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
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 👍 Thanks for fixing this Kostas!
refresh: true | ||
body: | ||
- '{ "index": { } }' | ||
- '{ "my": { "keyword.field": "abc" } }' |
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.
Can we have a test that introducing a dynamic field throws in this case?
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.
Done.
body: | ||
fields: [ "*" ] | ||
|
||
- match: { hits.hits.0.fields: { my.keyword.field: [ abc ] } } |
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.
You'll need to sort results for this test to work with multiple shards.
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.
Keep forgetting that.. Done.
|
||
doc = mapper.parse(source(""" | ||
{ "metrics": { "service": { "test.other.dots": "foo" } } }""")); | ||
assertNull(doc.rootDoc().getField("metrics.service.test.with.dots")); |
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.
assertNull(doc.rootDoc().getField("metrics.service.test.with.dots")); | |
assertNull(doc.rootDoc().getField("metrics.service.test.other.dots")); |
here and below?
# Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java
💔 Backport failed
You can use sqren/backport to manually backport by running |
…#117762) * Parse the contents of dynamic objects for [subobjects:false] * Update docs/changelog/117762.yaml * add tests * tests * test dynamic field * test dynamic field * fix tests
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…#117762) * Parse the contents of dynamic objects for [subobjects:false] * Update docs/changelog/117762.yaml * add tests * tests * test dynamic field * test dynamic field * fix tests (cherry picked from commit f2addbc) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java
#117919) * Parse the contents of dynamic objects for [subobjects:false] * Update docs/changelog/117762.yaml * add tests * tests * test dynamic field * test dynamic field * fix tests
#117921) * Parse the contents of dynamic objects for [subobjects:false] * Update docs/changelog/117762.yaml * add tests * tests * test dynamic field * test dynamic field * fix tests (cherry picked from commit f2addbc) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java
DocumentParser
skips parsing dynamic objects when[dynamic:false]
is set in a parent object. When[subobjects:false]
is also set, dynamic objects should be flattened instead.Fixes #117544