Evaluate ranked search results
- POST also GET /{index}/_rank_eval
- POST also GET /_rank_eval
Evaluate the quality of ranked search results over a set of typical search queries.
Required authorization
- Index privileges read
Query parameters
-
allow_no_indicesboolean · default: true -
If
false, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*returns an error if an index starts withfoobut no index starts withbar. -
expand_wildcardsstring · default: open -
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Supported values include:
all: Match any data stream or index, including hidden ones.open: Match open, non-hidden indices. Also matches any non-hidden data stream.closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.hidden: Match hidden data streams and hidden indices. Must be combined withopen,closed, orboth.none: Wildcard expressions are not accepted.
-
Values:
allopenclosedhiddennone -
If
true, missing or closed indices are not included in the response.
Request body
Response
-
detailsmap string to objectrequired -
The details section contains one entry for every query in the original requests section, keyed by the search request id
-
<string>object -
metric_scorenumberrequired -
The metric_score in the details section shows the contribution of this query to the global quality metric score
-
unrated_docsobjectrequired -
The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents