-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Generate IndexOrDocValuesQuery for term queries in IpFieldMapper #128846
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @iverase, I've created a changelog YAML for you. |
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
|
blocked by apache/lucene#14756 |
| query = InetAddressPoint.newPrefixQuery("field", InetAddresses.forString(ip), 16); | ||
| assertEquals(new IndexOrDocValuesQuery(query, convertToDocValuesQuery(query)), ft.termQuery(prefix, MOCK_CONTEXT)); | ||
|
|
||
| ft = new IpFieldMapper.IpFieldType("field", true, false); |
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.
For completeness, please consider adding tests that cover the doc values–only case, e.g.
ft = new IpFieldMapper.IpFieldType("field", false, true);
drempapis
left a comment
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! ty
|
@drempapis this is block because it changes the way queries behave, e.g some valid queries might hit a |
|
@iverase the idea would be to implement what I suggested in apache/lucene#14756 but I have not had time to do so. |
These will help if the query is generated in a big conjunction. It should get optimize accordingly.