-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
ESQL: Load keyword
fields missing doc_values
#98639
Conversation
Pinging @elastic/es-ql (Team:QL) |
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
// for the field type name to avoid adding a dependency to the module | ||
if (fieldType instanceof KeywordFieldMapper.KeywordFieldType | ||
|| fieldType instanceof TextFieldMapper.TextFieldType | ||
|| "match_only_text".equals(fieldType.typeName())) { |
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.
Could be extracted into a constant.
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'd left a comment on the other copy of this about how it'd be lovely if this could go backwards, with the mappers defining this behavior. But that's not worth the extra complexity now.
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 have thought about it too. Probably, the least invasive way to implement it in the field mappers is to add a new MappedFieldType.FielddataOperation.ESQL
and use that in the MappedFieldType.fielddataBuilder()
to define the behavior we need. I can give it a try in a following PR
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
This PR adds support for loading
keyword
fields havingdoc_values: false
in their mapping.The code follows the same code path as when loading
text
fields, loading field from the index (ifstored
istrue
) or extracting from the_source
.