Skip to content

Fix filtered knn vector search when query timeouts are enabled #129440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

benwtrent
Copy link
Member

@benwtrent benwtrent commented Jun 13, 2025

Turns out when we have query cancellation checks turned on, we wrap the filter bitset, meaning we cannot actually see that the inner Bits is a bitset.

This is important for the hnsw knn format readers, see:

https://github.com/apache/lucene/blob/1584c05b27ac31fbccb0ab328bf9f8eb6a7de414/lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99HnswVectorsReader.java#L335

Related: #126876

@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jun 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine
Copy link
Collaborator

Hi @benwtrent, I've created a changelog YAML for you.

@benwtrent benwtrent added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Jun 16, 2025
@elasticsearchmachine elasticsearchmachine merged commit a9ef822 into elastic:main Jun 16, 2025
24 checks passed
@benwtrent benwtrent deleted the bugfix/fix-vector-filter-perf branch June 16, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants