-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Use IndexOrDocValuesQuery in NumberFieldType#termQuery implementations #128293
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
Conversation
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Hi @iverase, I've created a changelog YAML for you. |
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.
I left a couple of small comments. thanks a lot, this makes sense to me. I wonder if our nightlies already cover the scenarios that will be improved by this change, and whether there are scenarios where there could be regressions.
server/src/main/java/org/elasticsearch/index/mapper/NumberFieldMapper.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/NumberFieldMapper.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/index/mapper/NumberFieldTypeTests.java
Show resolved
Hide resolved
IndexOrDocValues queries is used in other parts and in my experience it seems pretty solid implementation so any regressions should be considered a bug in the IndexOrDocValues implementation. |
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.
LGTM, thanks again!
It seems this change is making PushQueriesIT to fail in an unexpected way. I am having a hard time understanding what's going on. |
💚 Backport successful
|
Use IndexOrDocValuesQuery whenever possible so for low cardinality fields we don't need to allocated a FixedBitSet if the query is together with more restrictive filters.