Add algorithm and benchmark for filtered range search - #1228
Merged
Magdalen Dobson Manohar (magdalendobson) merged 69 commits intoAug 12, 2026
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
added 10 commits
July 14, 2026 18:31
Magdalen Dobson Manohar (magdalendobson)
force-pushed
the
users/magdalen/range_filter
branch
from
July 15, 2026 14:21
fff67b6 to
e30697f
Compare
added 2 commits
July 16, 2026 16:06
weiyaoluo (SeliMeli)
pushed a commit
to SeliMeli/DiskANN
that referenced
this pull request
Jul 22, 2026
While working on microsoft#1228, I noticed that there were some issues with our current implementation of range search and its testing. The main issue with testing is that there were no tests ensuring the `max_results` parameter was respected. I have added two tests that ensure this now. The main code had several issues with how `max_results` was handled: 1. The `max_results` parameter was allowed to be less than the initial L_search. This is a conceptual issue because the user expects `max_results` to stop the search from continuing for too long, and the compute used in the initial search will always be controlled by `initial_search_l`. 2. A `max_results` check was not enforced before deciding to continue to the second round search. This meant that if the max results was reached via the initial search, it might not be respected. 3. The second round search was not terminated when `max_results` was reached, meaning it would continue to perform unnecessary work. This PR fixes these issues by adding additional checks of `max_results` at the correct points in the code. --------- Co-authored-by: Magdalen Manohar <mmanohar@microsoft.com>
Mark Hildebrand (hildebrandmw)
left a comment
Contributor
There was a problem hiding this comment.
Thanks Magdalen, appreciate the work on this iteration!
added 2 commits
August 5, 2026 14:11
added 6 commits
August 5, 2026 20:33
Mark Hildebrand (hildebrandmw)
left a comment
Contributor
There was a problem hiding this comment.
Thanks Magdalen, just a few small comments. After this PR lands, need a serious garbage collection pass on algorithm implementations. The sharing of scratch space and general code organization has reached a point where we need to reevaluate the design. This reevaluation is not actionable for this PR.
Jack Moffitt (metajack)
approved these changes
Aug 11, 2026
Mark Hildebrand (hildebrandmw)
approved these changes
Aug 12, 2026
Magdalen Dobson Manohar (magdalendobson)
merged commit Aug 12, 2026
2882c75
into
main
29 checks passed
Magdalen Dobson Manohar (magdalendobson)
deleted the
users/magdalen/range_filter
branch
August 12, 2026 17:26
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.
This PR adds an algorithm for filtered range search to the DiskANN repository. Details of the algorithm, along with the experiments supporting it, are at this Wiki page.
This PR:
diskann, along with integration tests.diskann-benchmark, along with an integration test.test_data.Some enhancements/fixes to range search along the way:
test_datafor yfcc.