Skip to content

Conversation

@romseygeek
Copy link
Contributor

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.

…_values disabled (elastic#78841)

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.
@romseygeek romseygeek self-assigned this Oct 19, 2021
@romseygeek romseygeek merged commit 115aabf into elastic:7.x Oct 19, 2021
@romseygeek romseygeek deleted the nested/fieldnames-7x branch October 19, 2021 13:47
romseygeek added a commit to romseygeek/elasticsearch that referenced this pull request Nov 3, 2021
…_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 <[email protected]>
romseygeek added a commit that referenced this pull request Nov 3, 2021
…_values disabled (#78841) (#79462) (#80274)

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 <[email protected]>
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.

4 participants