You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug?
We have a cluster with about 60 million documents spread across weekly indexes. The weekly indexes are all added to a "documents" alias. Each weekly index has about 1 million documents, and each doc has a faiss hnsw knn_vector field with 256 dimensions.
We upgraded to OpenSearch 2.17 last week, and some of our k-NN queries no longer return hits. We have isolated the issue to k-NN queries (that are using efficient filtering) that have a range filter for a date field.
Here is the vector field (embeddings.OAI_TE3L_256) mapping:
The filtered subset for this query should result in 968 docs, which is less than k, and I believe should result in an exact knn search through the efficient knn filtering algorithm, however it does not seem like we are seeing this behavior. Instead, we are just getting 0 hits.
Overall, we are seeing inconsistent query results. For example:
If we run this query on a single weekly index rather than the entire documents alias, we do get expected hits back.
If we remove the range portion of the knn query filter, we get expected hits back
If we move the range filter outside of the knn query filter (and transform the query into a knn post-filter instead), we do get hits back
If we use a knn filter range query for a non-date field (such as a float field), we get expected hits back
What is the bug?
We have a cluster with about 60 million documents spread across weekly indexes. The weekly indexes are all added to a "documents" alias. Each weekly index has about 1 million documents, and each doc has a faiss hnsw knn_vector field with 256 dimensions.
We upgraded to OpenSearch 2.17 last week, and some of our k-NN queries no longer return hits. We have isolated the issue to k-NN queries (that are using efficient filtering) that have a range filter for a date field.
Here is the vector field (embeddings.OAI_TE3L_256) mapping:
Here is an example query that returns 0 hits:
The filtered subset for this query should result in 968 docs, which is less than k, and I believe should result in an exact knn search through the efficient knn filtering algorithm, however it does not seem like we are seeing this behavior. Instead, we are just getting 0 hits.
Overall, we are seeing inconsistent query results. For example:
What is the expected behavior?
K-NN efficient filtering should work as described https://opensearch.org/docs/latest/search-plugins/knn/filter-search-knn/ for knn range filters on a date field.
What is your host/environment?
The text was updated successfully, but these errors were encountered: