-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Why is score different from value in explanation? #28725
Comments
This is a bug, they should always be the same. Can you share your query? cc @elastic/es-search-aggs |
This is the query
Which value is used for sorting the search results? The value from _score or the value from _explanation? Is the result sorted correctly? |
Results are always sorted based on |
This is the complete explanation part:
|
I think it's just a known issue with |
I think we should fix it: scores are explanations should always match. |
Fair enough, I restored the adoptme tag. Also note that the score will not always match the explanations since we can have more than one rescorer so only the explanation of the last rescorer should match the final score of the hit. |
To implement the correct The simpler solution would be to remove |
The
The window_size should be small (100-1000 or something) so I think that's ok and I don't see how we could do it differently. |
Currently in a rescore request if window_size is smaller than the top N documents returned (N=size), explanation of scores could be incorrect for documents that were a part of topN and not part of rescoring. This PR corrects this, but saving in RescoreContext docIDs of documents for which rescoring was applied, and adding rescoring explanation only for these docIDs. Closes elastic#28725
Currently in a rescore request if window_size is smaller than the top N documents returned (N=size), explanation of scores could be incorrect for documents that were a part of topN and not part of rescoring. This PR corrects this, but saving in RescoreContext docIDs of documents for which rescoring was applied, and adding rescoring explanation only for these docIDs. Closes #28725
Currently in a rescore request if window_size is smaller than the top N documents returned (N=size), explanation of scores could be incorrect for documents that were a part of topN and not part of rescoring. This PR corrects this by saving in RescoreContext docIDs of documents for which rescoring was applied, and adding rescoring explanation only for these docIDs. Closes #28725
Currently in a rescore request if window_size is smaller than the top N documents returned (N=size), explanation of scores could be incorrect for documents that were a part of topN and not part of rescoring. This PR corrects this by saving in RescoreContext docIDs of documents for which rescoring was applied, and adding rescoring explanation only for these docIDs. Closes #28725
Currently in a rescore request if window_size is smaller than the top N documents returned (N=size), explanation of scores could be incorrect for documents that were a part of topN and not part of rescoring. This PR corrects this, but saving in RescoreContext docIDs of documents for which rescoring was applied, and adding rescoring explanation only for these docIDs. Closes elastic#28725
Relates to elastic#28725
Hi,
I did an explain request and get the following response:
As you can see the score value is 2 and the value in the explanation is 196.23717.
Why is this different?
The text was updated successfully, but these errors were encountered: