Skip to content

Fix execution of exists query within nested queries on field with doc…#80274

Merged
romseygeek merged 1 commit intoelastic:7.15from
romseygeek:bug/nested-exists-fix-7.15
Nov 3, 2021
Merged

Fix execution of exists query within nested queries on field with doc…#80274
romseygeek merged 1 commit intoelastic:7.15from
romseygeek:bug/nested-exists-fix-7.15

Conversation

@romseygeek
Copy link
Copy Markdown
Contributor

…_values disabled (#78841) (#79462)

The FieldNamesFieldMapper adds non-indexed fields to a special metadata
field so that exists queries can be run efficiently. This is built in a postParse
method that is run once per document. However, this means that nested
documents are not handled correctly - non-indexed field names are added to
the parent document's metadata field rather than to the nested document's
field.

This commit fixes things to add non-indexed field names directly to the
nested documents.

Co-authored-by: Yoann Rodière yoann@hibernate.org

…_values disabled (elastic#78841) (elastic#79462)

The FieldNamesFieldMapper adds non-indexed fields to a special metadata
field so that exists queries can be run efficiently.  This is built in a postParse
method that is run once per document.  However, this means that nested
documents are not handled correctly - non-indexed field names are added to
the parent document's metadata field rather than to the nested document's
field.

This commit fixes things to add non-indexed field names directly to the
nested documents.

Co-authored-by: Yoann Rodière <yoann@hibernate.org>
@romseygeek romseygeek self-assigned this Nov 3, 2021
@romseygeek romseygeek merged commit 42ae317 into elastic:7.15 Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants