-
Notifications
You must be signed in to change notification settings - Fork 792
Feature/solr 17928 finalize pr #3941
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
Open
eliaporciani
wants to merge
21
commits into
apache:main
Choose a base branch
from
SeaseLtd:feature/SOLR-17928_finalize_pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/solr 17928 finalize pr #3941
eliaporciani
wants to merge
21
commits into
apache:main
from
SeaseLtd:feature/SOLR-17928_finalize_pr
Conversation
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
-Resolved merge conflicts, added efSearch support on top of knnStrategy
…culate efSearch internally -Set default efSearchScaleFactor as 1.0, which means default efSearch = topK
Handled NaN value Added tests
chatman
pushed a commit
that referenced
this pull request
Dec 11, 2025
Co-authored-by: punAhuja <[email protected]> Co-authored-by: Elia <[email protected]>
chatman
pushed a commit
that referenced
this pull request
Dec 11, 2025
Co-authored-by: punAhuja <[email protected]> Co-authored-by: Elia <[email protected]>
chatman
pushed a commit
that referenced
this pull request
Dec 11, 2025
Co-authored-by: punAhuja <[email protected]> Co-authored-by: Elia <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
https://issues.apache.org/jira/browse/SOLR-17928
Description
This PR is based on #3711, which appears inactive.
I fetched the original commits, merged them with the latest main, resolved conflicts, and pushed this updated branch to help move the contribution forward.
All original commits are preserved, and full credit goes to the original author, who has been added as a contributor to this PR.
The previous version introduced an efSearch parameter. After review, this has been replaced with efSearchScaleFactor parameter.
This parameter controls how much the KNN query should overfetch. If not set, it defaults to 1, meaning no overfetching beyond topK × 1.
Solution
The KNN execution now derives the internal efSearch value by multiplying topK with the user-provided efSearchScaleFactor. This allows controlled overfetching without exposing efSearch directly.
To apply this logic cleanly, new wrapper query classes (SolrKnnFloatVectorQuery and SolrKnnByteVectorQuery) were introduced.
These delegate to Lucene’s KNN queries while injecting the scaled efSearch value before execution.
During this update, I also:
Tests
Tests were updated to reflect the new behavior, ensuring that:
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.