-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: the HNSW index doesn't respect to refine factor #2122
Conversation
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
ACTION NEEDED Lance follows the Conventional Commits specification for release automation. The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. For details on the error please inspect the "PR Title Check" action. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2122 +/- ##
=======================================
Coverage 81.09% 81.10%
=======================================
Files 160 160
Lines 47411 47412 +1
Branches 47411 47412 +1
=======================================
+ Hits 38449 38454 +5
+ Misses 6743 6741 -2
+ Partials 2219 2217 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -163,10 +163,11 @@ impl VectorIndex for HNSWIndex { | |||
) | |||
}; | |||
|
|||
let ef = query.k + query.k / 2; | |||
let k = query.k * query.refine_factor.unwrap_or(1) as usize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do we want to introduce a new param for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean ef
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, maybe we should just expose EF
No description provided.