Skip to content

ES|QL: Add support for semantic_text in knn function #132066

@ioanatia

Description

@ioanatia

tracked in #123043

In the query DSL, the knn query support semantic_text fields, not just dense_vector.
We did this as a way to give users more advanced control in how semantic_text fields are queried, since the knn query has options like k and num_candidates.

We need to make sure we do the same in ES|QL and have the knn function accept semantic_text fields.
ES|QL sees semantic_text fields as just text, since it uses field caps to determine the field types.

This means that the knn function will need to support text fields as well.

In the case where the knn function is used with actual text fields (not semantic_text) we will only be able to raise an error at the shard level, which is fine as long as it's bubbled up correctly.

Metadata

Metadata

Assignees

Labels

:Search Relevance/SearchCatch all for Search Relevance>featureTeam:Search RelevanceMeta label for the Search Relevance team in Elasticsearchpriority:normalA label for assessing bug priority to be used by ES engineers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions