Improve HNSW filtered search speed through new heuristic#126876
Merged
benwtrent merged 8 commits intoelastic:mainfrom May 6, 2025
Merged
Improve HNSW filtered search speed through new heuristic#126876benwtrent merged 8 commits intoelastic:mainfrom
benwtrent merged 8 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Collaborator
|
Hi @benwtrent, I've created a changelog YAML for you. |
…nwtrent/elasticsearch into feature/better-vector-filtered-search
Member
Author
|
I have been thinking about this more, I am thinking that for EXISTING indices, we do not change the default behavior (e.g. it should be fanout), but for NEW indices, we should. This complicates things, but the recall/latency behavior seems to justify this I think. The other option is we default to What do you think @jimczi @mayya-sharipova ? |
parkertimmins
pushed a commit
to parkertimmins/elasticsearch
that referenced
this pull request
May 7, 2025
) Apache Lucene 10.2 exposes a new search strategy for executing filtered searches over HNSW graphs. This PR switches to utilizing that strategy by default as it generally provides a much better recall/latency pareto frontier than our regular hnsw fanout search. Additionally, a new tech-preview setting is provided to potentially revert to the old fanout behavior if issues arise.
ywangd
pushed a commit
to ywangd/elasticsearch
that referenced
this pull request
May 9, 2025
) Apache Lucene 10.2 exposes a new search strategy for executing filtered searches over HNSW graphs. This PR switches to utilizing that strategy by default as it generally provides a much better recall/latency pareto frontier than our regular hnsw fanout search. Additionally, a new tech-preview setting is provided to potentially revert to the old fanout behavior if issues arise.
afoucret
pushed a commit
to afoucret/elasticsearch
that referenced
this pull request
May 9, 2025
) Apache Lucene 10.2 exposes a new search strategy for executing filtered searches over HNSW graphs. This PR switches to utilizing that strategy by default as it generally provides a much better recall/latency pareto frontier than our regular hnsw fanout search. Additionally, a new tech-preview setting is provided to potentially revert to the old fanout behavior if issues arise.
jfreden
pushed a commit
to jfreden/elasticsearch
that referenced
this pull request
May 12, 2025
) Apache Lucene 10.2 exposes a new search strategy for executing filtered searches over HNSW graphs. This PR switches to utilizing that strategy by default as it generally provides a much better recall/latency pareto frontier than our regular hnsw fanout search. Additionally, a new tech-preview setting is provided to potentially revert to the old fanout behavior if issues arise.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jun 16, 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apache Lucene 10.2 exposes a new search strategy for executing filtered searches over HNSW graphs.
This PR switches to utilizing that strategy by default as it generally provides a much better recall/latency pareto frontier than our regular hnsw fanout search.
Additionally, a new tech-preview setting is provided to potentially revert to the old fanout behavior if issues arise.