[core] Add primary-key vector bucket search#8569
Open
JingsongLi wants to merge 1 commit into
Open
Conversation
53efbbb to
1e547f1
Compare
leaves12138
approved these changes
Jul 12, 2026
leaves12138
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the latest head. The shared metric extraction preserves the existing raw-vector score semantics, exact fallback keeps physical row positions across nulls and deletion vectors, and bucket-level merging avoids rescanning ANN-covered files while applying deterministic lower-is-better ordering. The focused 18-test Core suite passes locally. LGTM.
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.
Summary
Adds the bucket-local search kernel for primary-key vector indexes. A bucket can now merge ANN results with exact fallback results from active data files that are not covered by ANN yet, while sharing the existing vector metric semantics and returning physical source positions for the later read path.
Changes
AbstractVectorReadintoVectorSearchMetric, preserving the existing higher-is-better raw score behavior while keeping PK distances lower-is-better and bounded for cosine.PkVectorSearchResultcontaining data file name, zero-based physical row position, and normalized distance, and use it directly from ANN search instead of the unreleased nested candidate type.l2,cosine, andinner_product, preserving physical positions across null vectors and applying deletion-vector exclusions.Testing
Notes