Closed sevgiborazan closed 2 months ago
Pinging @elastic/es-search-relevance (Team:Search Relevance)
To do what you want to do specifically, you would have to use a dis_max
query: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-dis-max-query.html
GET /_search
{
"query": {
"dis_max": {
"queries": [
{ "knn": { ... } },
{ "knn": { ... } },
...
],
}
}
}
Support for knn
as a regular query was added in 8.12
Description
Hi, I'm using Elastic 8.7.1 version and have a vector index given below
With these index and data, I want to implement multi knn query with multiple vectors. The result i expected should to be sorted for each document according to the max similarity vector among the vectors of the query. I can implement this with script_score like
When I try to run approximate knn query, I realized it takes the sum of vector similarities as score.
https://www.elastic.co/guide/en/elasticsearch/reference/8.7/knn-search.html#_search_multiple_knn_fields
Is there a way to implement
knn_score_mode: MAX
for multi knn search requests?