-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Remove SEMANTIC_TEXT data type in ES|QL #125581
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-relevance (Team:Search Relevance) |
ChrisHegarty
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
carlosdelest
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.
Nice cleanup! 🧹
I think we can remove the feature flag in EsqlCorePlugin as well
|
|
||
| /** | ||
| * support for aggregations on semantic_text | ||
| */ |
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 think we need to remove the feature flag in EsqlCorePlugin as well?
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.
ha! I thought I already did - thanks for catching this! added another commit to address this
related: #115103
This is a tech debt cleanup PR.
When we initially added the
SEMANTIC_TEXTdata type in ES|QL, we did not foresee that as part of making semantic text GA we will want to change the field caps response forsemantic_textfields to simply be reported astext.Just as a recap, semantic search and
semantic_textsupport in ES|QL is done through the following components:semantic_textastext, meaning that ES|QL will useDataType.TEXTforsemantic_textfieldsmatchfunction, which translates to amatchquery which supports queryingsemantic_textfieldsPreMapperstep where do query builder rewriting on the coordinator. This is needed for theMatchQueryBuilder(that thematchfunction uses) in order to get the embeddings of the query string when doing semantic search.We remove the
DataType.SEMANTIC_TEXTand theEsqlCorePlugin.SEMANTIC_TEXT_FEATURE_FLAG.Most of the code we remove is not actually reachable, not in snapshot or non-snapshot builds.
This is because we never actually get to translate a field from a queried index to an
EsFieldthat is usingDataType.SEMANTIC_TEXT.Semantic search and
semantic_textsupport continue to work even with these changes.We continue to have code coverage for these in csv tests, for example:
semantic_textfields with most of the functions and commands that support text/keywordmatch-function.csv-spec,scoring.csv-specandmatch-operator.csv-spechave tests that do semantic search