MOD-13177 add support for RERANK parameter in HNSW disk#943
Merged
BenGoldberger merged 5 commits intomainfrom May 4, 2026
Merged
MOD-13177 add support for RERANK parameter in HNSW disk#943BenGoldberger merged 5 commits intomainfrom
BenGoldberger merged 5 commits intomainfrom
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #943 +/- ##
==========================================
+ Coverage 96.71% 96.90% +0.19%
==========================================
Files 129 129
Lines 8057 7683 -374
==========================================
- Hits 7792 7445 -347
+ Misses 265 238 -27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
GuyAv46
previously approved these changes
Apr 30, 2026
| // Zero-initialize qparams and explicitly set fields whose "absent" state is not | ||
| // representable by all-zeros (e.g. tristate enums where 0 maps to a valid value). | ||
| static void _InitQueryParams(VecSimQueryParams *qparams, VecSimAlgo index_type, bool is_disk) { | ||
| bzero(qparams, sizeof(VecSimQueryParams)); |
Collaborator
There was a problem hiding this comment.
bzero is actually deprecated. Consider taking this opportunity and replacing it with memset.
GuyAv46
approved these changes
May 3, 2026
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.
Describe the changes in the pull request
add support for rerank config
Which issues this PR fixes
Main objects this PR modified
Mark if applicable
Note
Medium Risk
Adds new query-parameter parsing for disk-based HNSW and changes query-param initialization semantics, which could affect runtime query behavior if incorrectly gated or defaulted.
Overview
Adds support for a new
RERANKruntime query parameter for disk-based HNSW: introducesVecSimCommonStrings::HNSW_RERANK_STRING, aTRUE/FALSEvalidator, and resolver logic that initializeshnswDiskRuntimeParams.shouldReranktoVecSimBool_UNSETand rejectsRERANKon non-disk or non-HNSW indexes.Refactors
VecSimIndex_ResolveParamsto usebasicInfo().isDiskand a dedicated_InitQueryParamsinitializer instead of a raw zeroing, and adds test-onlysetIsDiskForTestingplus new unit tests covering defaults, acceptance/rejection, and error paths forRERANKon “disk” vs RAM HNSW.Minor follow-ups: fixes
TieredSVSIndex::debugInfo()to use the boolean result ofatomic_flag::test(), and updates tiered-info tests to comparebackgroundIndexingagainstVecSimBool_TRUE/FALSE.Reviewed by Cursor Bugbot for commit e26e87e. Bugbot is set up for automated code reviews on this repo. Configure here.