Min score

I want to ask is it possible to use the highest score to calculate the min score?

Just like the min score is equal to the half of the highest score?

may be like

"min_score": max_score/2

Can you be more explicit, you want to compute the minimum score across what kind of scores? Sub queries? Nested documents? Something else?

@jpountz Thank you for your reply

  "took": 39,
  "timed_out": false,
  "_shards": {
"total": 5,
"successful": 5,
"failed": 0
  "hits": {
"total": 4873,
"max_score": 9.238034,

I want to use the above max_score to compute the minimum score. Then it would be used to filter the results which are lower than max_score / 2.

This is a somewhat dangerous approach given that scores are not percentages of how well a document matches. That said, if you really want to do that, you will need to issue a first search request whose only purpose is to compute the maximum score, and a second request that passes max_score/2 as a value for the min_score option: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-min-score.html.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.