-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Ensure that _exists queries on keyword fields use norms when they're available. #33006
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
Ensure that _exists queries on keyword fields use norms when they're available. #33006
Conversation
|
Pinging @elastic/es-search-aggs |
a15b142 to
2be290d
Compare
jimczi
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.
Looks good, thanks @jtibshirani
Should we also disable the creation of the field names field if norms are activated:
elasticsearch/server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java
Line 378 in 2be290d
| } else if (fieldType().stored() || fieldType().indexOptions() != IndexOptions.NONE) { |
ef4cc72 to
5b9e478
Compare
5b9e478 to
b03e5ea
Compare
jimczi
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.
Left a minor comment, LGTM otherwise.
| Field field = new Field(fieldType().name(), binaryValue, fieldType()); | ||
| fields.add(field); | ||
|
|
||
| if (!fieldType().hasDocValues() && fieldType().omitNorms()) { |
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.
nit: we prefer to use fieldType().hasDocValues() == false for clarity.
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.
Got it. I will struggle a bit with this inside but codebase consistency is most important :)
No description provided.