API/behavior changes

Modified routes

The GET routes have an additionalrankingScoreThreshold url parameter. It is optional and defaults to null (no threshold). If provided, it must be a number between 0.0 and 1.0 inclusive.

The POST routes have an additional rankingScoreThreshold body parameter. It is optional and defaults to null (no threshold). If provided, it must be a number between 0.0 and 1.0 inclusive.

The parameter can be added individually to each query in a multi-search request.

In both cases, when a rankingScoreThreshold is provided, the results of the search/similar request are modified in the following way:

  1. No document whose _rankingScore is under the rankingScoreThreshold is returned
  2. Any document encountered during the search that is under the threshold is removed from the set of candidates and won’t count towards the estimatedTotalHits, totalHits and the facet distribution.

Examples

request without score threshold:

POST /indexes/movies/search
{
  "q": "Badman dark returns 1",
  "showRankingScore": true,
  "limit": 5
}

results: