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

[8.3] Don't run include_in_parent when in copy_to context (#87123) #87508

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

romseygeek
Copy link
Contributor

Backports the following commits to 8.3:

We changed how copy_to is implemented in elastic#79922, which moved
the handling of dots in field names into a specialised parser. Unfortunately,
while doing this we added a bug whereby every time a copy_to directive
is processed for a nested field, the nested field's include_in_parent logic
would be run, meaning that the parent would end up with multiple copies
of the nested child's fields.

This commit fixes this by only running include_in_parent when the parser
is not in a copy_to context. It also fixes another bug that meant the parent
document would contain multiple copies of the ID field.

Fixes elastic#87036
@romseygeek romseygeek added :Search Foundations/Mapping Index mappings, including merging and defining field types >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Search Meta label for search team labels Jun 8, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v8.3.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants