Skip to content

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

Merged
javanna merged 4 commits intoelastic:masterfrom
javanna:test/dottedarray_dynamicfalse
Mar 18, 2022
Merged

Add test for previously broken behaviour on dotted array field#85081
javanna merged 4 commits intoelastic:masterfrom
javanna:test/dottedarray_dynamicfalse

Conversation

@javanna
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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
Copy Markdown
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