-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search Relevance/VectorsVector searchVector search>enhancementTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearch
Description
- We would like to add more similarity/distance metrics for vectors
- Simplify the API
GET myindex/_vectors/knnsearch
{
"query": {
"match": { "my_text": "text1" }
},
"similarity" : "l1norm",
"field": "my_dense_vector",
"query_vector": [0.5, 1, -0.5]
}This is for the simple precise knn search implemented as the sequential scan of documents filtered by the optional query.
Possible similarity metrics: cosine, dotProduct, l1norm, l2norm.
For cosine and dotProduct, a score computed as is. For l1norm and l2norm, the score is computed as 1/l1norm and 1/l2norm.
Metadata
Metadata
Assignees
Labels
:Search Relevance/VectorsVector searchVector search>enhancementTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearch