Unexpected scores for uniform vector edge case when knn query is applied toint8_hnsw
#109416
Labels
>bug
:Search Relevance/Vectors
Vector search
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Elasticsearch Version
8.14.0
Installed Plugins
No response
Java Version
bundled
OS Version
Linux fedora 6.8.11-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sun May 26 20:05:41 UTC 2024 x86_64 GNU/Linux
Problem Description
With the recent release, using the default
index_option.type
(which ends up creating adense_vector
ofint8_hnsw
type) may result in identical scores for different vectors, and as a result, the similarity filter of the knn query is also not filtering out the results.Steps to Reproduce
index_options.type
are set explicitly:results in:
all documents retuned with the same score of
1.0
when running the same query for the
hnsw
field:the result is:
This also result in
[similarity](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#knn-similarity-search)
filter in a knn query to have no effect.Elasticsearch is started from the official docker image.
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: