Remove SEMANTIC_TEXT data type in ES|QL#125581
Merged
ioanatia merged 7 commits intoelastic:mainfrom Apr 2, 2025
Merged
Conversation
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
carlosdelest
approved these changes
Mar 25, 2025
Member
carlosdelest
left a comment
There was a problem hiding this comment.
Nice cleanup! 🧹
I think we can remove the feature flag in EsqlCorePlugin as well
|
|
||
| /** | ||
| * support for aggregations on semantic_text | ||
| */ |
Member
There was a problem hiding this comment.
I think we need to remove the feature flag in EsqlCorePlugin as well?
Member
Author
There was a problem hiding this comment.
ha! I thought I already did - thanks for catching this! added another commit to address this
16 tasks
andreidan
pushed a commit
to andreidan/elasticsearch
that referenced
this pull request
Apr 9, 2025
18 tasks
ioanatia
added a commit
to ioanatia/elasticsearch
that referenced
this pull request
Jun 3, 2025
ioanatia
added a commit
that referenced
this pull request
Jun 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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