Exclude results by relative score


(Noam Tenne) #1

Is there any way I can exclude search results by the document's score relative to the query's max score? (similar to min_score)
For example, I run a query that produces a result set in which the max score may vary 3.9549227, 1.8456044, etc.
Whatever the number of results or max score may be, I'd like to always receive the documents in the 30% top scorers.
I figured I could also achieve this with the following methods:

  • Run a count request and then run my query with a result limit of 30% from the total count.
  • Write a custom score function that will normalize the query scores in a manner that lets me use the min_score exclusion.

But I'll happy to hear your opinions.


(system) #2