-
Notifications
You must be signed in to change notification settings - Fork 702
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
SOLR-15437: ReRanking / LTR does not work in SolrCloud with custom sort by score #171
Draft
tomglk
wants to merge
13
commits into
apache:main
Choose a base branch
from
tkaessmann:SOLR-15437-scoreSort
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.
Conversation
This file contains 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
The basic idea is to have two queues in the QueryComponent. First get the results of the rerankend docs and after them place the other docs
…as used to keep the shortcut logic. Instead, make it configurable via constructor param.
…eues to SortedHitQueueManager to remove complexity from mergeIds( )
…fl, because we need it for sorting
7 tasks
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.
https://issues.apache.org/jira/browse/SOLR-15437
Description
This Pr is based upon the changes made in #151.
So the base for this PR is a functioning ReRank / LTR in SolrCloud.
The problem that this PR wants to solve is, that the not-reRanked documents cannot be sorted by score.
The cause for this is, that the originalScore of a document gets overridden during ReRanking. Therefore we cannot access it if the document should no longer be reRanked after merging the results of multiple shards. (Because its reRanked score is too low for it to be placed under the number of documents that should be reRanked.)
Solution
Please note:
The code in this PR is a very rough draft. There are multiple FIXMEs and TODOs that still need to addressed. Also, I am not sure about the multisharding bahavior.
This is why this PR is a draft. It should serve as base to enable a better exchange about possible solutions.
We track the originalScore similar to the score. The originalScore never gets overridden. We can use it for the
queue
in theSortedHitQueueManager
.(More detail will follow.)
Tests
We made the test
testSimpleQueryCustomSortByScoreWithSubResultSetAndRowsLessThanExistingDocs
that checks that the documents that should not get reRanked are sorted by score.Multiple tests break!
The tests in
org.apache.solr.ltr
are green with changes inTestLTRReRankingPipeline.testDocParam()
.Tests in
org.apache.solr
:4115 tests run (I cancelled it)
3971 passes
seed: seed#[3DC97B489377F7B9]
tests failes 2:
Checklist
Please review the following and check all that apply:
main
branch. Attention! No, this is developed against the branch from SOLR-15437: ReRanking/LTR does not work in combination with custom sort and SolrCloud #151./gradlew check
.