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

Add test for previously broken behaviour on dotted array field #85081

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

javanna
Copy link
Member

@javanna javanna commented Mar 17, 2022

Previously, when using dynamic: false, an array field with a dot in its name, whose suffix matched
a mapped field’s name, had its values merged with the mapped field unexpectedly. This has been fixed by #79922

This commit adds a test for that scenario and verifies that the bug is fixed.

Closes #65333

Previously, when using dynamic: false, an array field with a dot in its name, whose suffix matched
a mapped field’s name, had its values merged with the mapped field unexpectedly. This has been fixed by elastic#79922

This commit adds a test for that scenario and verifies that the bug is fixed.

Closes elastic#65333
@javanna javanna added >test Issues or PRs that are addressing/adding tests :Search Foundations/Mapping Index mappings, including merging and defining field types v8.2.0 labels Mar 17, 2022
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Mar 17, 2022
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed a bug by accident, nice!

b.field("myfield", "value1");
b.array("something.myfield", "value2", "value3");
}));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here clarifying what we expect? Something like:

// dynamic is false, so `something.myfield` should be ignored entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team >test Issues or PRs that are addressing/adding tests v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dotted named field values can merge with non-dotted fields of the same name
3 participants