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
Add doc match score support to percolate api #13827
Comments
@ncolomer Scoring how percolator queries match with the document being percolated requires different scoring then exists today in search which is based tf/idf. But this feature is interesting and I think this should be made possible in the percolate api. I think the score should be based on proximity, how close the matches are in the document being percolated. |
@martijnvg thanks for your answer! You mean that, the way percolation is implemented today, it does not benefit from internal scoring tools (that the regular search API does for instance)? Actually, this score would be useful to compare 2 consecutive docs being percolated: if they both match the same percolation query, it might be interesting to give them a score (ie. how well they match the query) to compare them. |
Right now there is just no scoring on how a query matches with the document being percolated. So I think this should be added at some point. The score that is being returned by the percolate api is just how the percolator query in the percolate api matches with the metadata on the percolator query. |
Now that the core percolator has been refactored to be a Lucene query adding scoring to the percolator has been made much easier. And with the upcoming refactoring in #16349 (replacing the percolate api with percolator query in query dsl) exposing the scores from how queries match with the MemoryIndex becomes a low hanging fruit. (right now the percolator just ignores that score) |
Percolator query documents are scored based on how well they match with the document being percolated. Closes elastic#13827
Thanks a lot @martijnvg! 👍 |
The percolate API documentation mentions
track_scores
andsort
options in the Additional request body options section. More precisely, we can read the following notes, respectively:I'm wondering why there is nothing in the API about the score of the document itself (being percolated) among the various percolator queries?
I read somewhere that this would be due to hit score being relative to its resultset, and that in a percolator query, we only consider one document at a time, so the score on each percolator query is not really relevant.
I was expecting #3506 to be the solution, but it's not related after having a look. Such a feature is also mentioned here in the mailing list but there is no technical answer.
Can you confirm? Is there any way/plan to get a percolation score?
The text was updated successfully, but these errors were encountered: