Evaluate ranked search results Added in 6.2.0
Evaluate the quality of ranked search results over a set of typical search queries.
Query parameters
-
allow_no_indices boolean
If
false
, the request returns an error if any wildcard expression, index alias, or_all
value 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 withfoo
but no index starts withbar
. -
expand_wildcards string | array[string]
Whether to expand wildcard expression to concrete indices that are open, closed or both.
-
search_type string
Search operation type
POST /_rank_eval
curl \
-X POST http://api.example.com/_rank_eval \
-H "Content-Type: application/json" \
-d '{"requests":[{"id":"string","request":{"query":{},"size":42.0},"ratings":[{"_id":"string","_index":"string","rating":42.0}],"template_id":"string","params":{"additionalProperty1":{},"additionalProperty2":{}}}],"metric":{"":{"k":42.0,"maximum_relevance":42.0}}}'