-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix assertion error when using passthrough with contradicting fields #110326
Fix assertion error when using passthrough with contradicting fields #110326
Conversation
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
server/src/main/java/org/elasticsearch/index/mapper/FieldTypeLookup.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching and sending a fix promptly.. Tricky logic, the new version is much cleaner.
💔 Backport failed
You can use sqren/backport to manually backport by running |
The way passthrough field types are created and how the priority is configured has significantly changed in 8.15 with #106829. Backporting this fix to 8.14.x doesn't make sense. |
I've added a yml rest test that reproduces an assertion error when using the
passthrough
field type with conflicts on multiple levels with a top-levelmatch_only_text
field.When changing the top-level field to a different field type, for example,
keyword
ortext
, the assertion error disappears, but the ordering is not quite right. Note that sometimes the tests pass and sometimes they fail with the following message:Expected a list containing 0: expected "top-level" but was "resource"
. Seems like in certain cases, the passthrough field type overrides the top-level field. I'm not sure if the two issues are related or separate.This is a dump of the search: