feat(search): add fast_query for dense read-only collections - #761
Open
luoxiaojian wants to merge 8 commits into
Open
luoxiaojian wants to merge 8 commits into
luoxiaojian wants to merge 8 commits into
Conversation
luoxiaojian
requested review from
Cuiyus,
chinaux,
iaojnh,
richyreachy and
zhourrr
as code owners
September 16, 2026 07:13
richyreachy
reviewed
Sep 17, 2026
JalinWang
reviewed
Sep 17, 2026
luoxiaojian
force-pushed
the
codex/fast-query-upstream
branch
from
September 17, 2026 12:47
7161726 to
7e0bad7
Compare
Return owned internal-ID arrays and optional scores through C++ search_fast and Collection.fast_query with a thin NumPy binding. Reuse query parameters and graph/Flat fast paths, retaining filtered and multi-segment fallbacks. Preserve the existing scale_factor defaults and Uniform raw-Flat fallback. Cover native reference types, default and explicit refine budgets, all dense index families, parameter reuse, result ownership, and untrained/mixed Uniform segments. Validation: 634 related Python tests passed; 70 C++ tests passed with one existing skip. Ruff, changed-line clang-format, and diff checks passed. Adapted from alignment commit 9ddbd5aa082615226d91addb41cd60496143d15a onto upstream/main 43f72b1.
Reuse query parameter mapping across ordinary and fast queries, remove redundant cached references and result copies, and handle empty collections consistently. Add coverage for reusable parameters, empty collections, and Uniform quantizer fallback before and after optimize and subsequent inserts. Validation: 151 related tests passed; the complete 780-point SIFT/GIST comparison stayed within the established QPS and recall tolerances.
Use Turbo distance evaluation and score normalization in fast Flat searches. Preserve base query parameters when graph indexes fall back to Flat, and keep strict validation for concrete graph query paths. Stabilize the queue recovery test by leaving background eviction headroom. Validation: seven related C++ test executables passed; Python regressions passed 277 tests with seven platform skips; queue recovery passed 500 repetitions; clang-format and git diff checks passed.
luoxiaojian
force-pushed
the
codex/fast-query-upstream
branch
from
September 18, 2026 03:29
7e0bad7 to
9ddd8ef
Compare
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.
Return owned internal-ID arrays and optional scores through C++ search_fast and Collection.fast_query with a thin NumPy binding. Reuse query parameters and graph/Flat fast paths, retaining filtered and multi-segment fallbacks.
Preserve the existing scale_factor defaults and Uniform raw-Flat fallback. Cover native reference types, default and explicit refine budgets, all dense index families, parameter reuse, result ownership, and untrained/mixed Uniform segments.
Validation: 634 related Python tests passed; 70 C++ tests passed with one existing skip. Ruff, changed-line clang-format, and diff checks passed.
Adapted from alignment commit 9ddbd5aa082615226d91addb41cd60496143d15a onto upstream/main 43f72b1.