-
Notifications
You must be signed in to change notification settings - Fork 1.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
Enable doc_values based searching across different field types #11205
Comments
Hi, are we on track for this to be released in 2.12 ? |
Note that for Boolean fields, we might not see much benefit from a performance standpoint for indexed fields (since we have an efficient That said, for consistency, now that we're supporting DV-only queries on many field types (including keyword, where Boolean is essentially a very restricted subcase of a keyword field), I like the idea that any field with doc values can support a (maybe slow) DV-only query. |
Is your feature request related to a problem? Please describe.
While working on #11097 i realized that MultiTerm queries over
Boolean
fields in OpenSearch don't support doc_values. I also noticed that the documentation is incorrect and that booleans have doc_values enabled by default.This is prevalent across multiple field types, there is a fix going out in #11144 to fix this for IP fields, I would also like to do this for other fields:
OpenSearch/server/src/main/java/org/opensearch/index/query/VectorGeoShapeQueryProcessor.java
Line 84 in 10d34be
Describe the solution you'd like
Since boolean fields type extends
TermBasedFieldType
we should probably override thetermQuery
andtermsQuery
functions and add support for doc_values queries. While we're at it, we should also addIndexOrDocValuesQuery
to the range query. This will help use-cases where we have a range on a boolean field matching a lot of values.Describe alternatives you've considered
Alternative is to do nothing. This is obviously bad since users will miss out on doc_values based queries that can improve performance.
Additional context
N/A
The text was updated successfully, but these errors were encountered: