A comma-separated list of data streams, indices, and index aliases used to limit the request.
Wildcard (*) expressions are supported.
To target all data streams and indices in a cluster, omit this parameter or use _all or *.
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 targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
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 with open, closed, or both.none: Wildcard expressions are not accepted.Values are all, open, closed, hidden, or none.
Search operation type
GET /my-index-000001/_rank_eval
{
"requests": [
{
"id": "JFK query",
"request": { "query": { "match_all": {} } },
"ratings": []
} ],
"metric": {
"precision": {
"k": 20,
"relevant_rating_threshold": 1,
"ignore_unlabeled": false
}
}
}
resp = client.rank_eval(
index="my-index-000001",
requests=[
{
"id": "JFK query",
"request": {
"query": {
"match_all": {}
}
},
"ratings": []
}
],
metric={
"precision": {
"k": 20,
"relevant_rating_threshold": 1,
"ignore_unlabeled": False
}
},
)
const response = await client.rankEval({
index: "my-index-000001",
requests: [
{
id: "JFK query",
request: {
query: {
match_all: {},
},
},
ratings: [],
},
],
metric: {
precision: {
k: 20,
relevant_rating_threshold: 1,
ignore_unlabeled: false,
},
},
});
response = client.rank_eval(
index: "my-index-000001",
body: {
"requests": [
{
"id": "JFK query",
"request": {
"query": {
"match_all": {}
}
},
"ratings": []
}
],
"metric": {
"precision": {
"k": 20,
"relevant_rating_threshold": 1,
"ignore_unlabeled": false
}
}
}
)
$resp = $client->rankEval([
"index" => "my-index-000001",
"body" => [
"requests" => array(
[
"id" => "JFK query",
"request" => [
"query" => [
"match_all" => new ArrayObject([]),
],
],
"ratings" => array(
),
],
),
"metric" => [
"precision" => [
"k" => 20,
"relevant_rating_threshold" => 1,
"ignore_unlabeled" => false,
],
],
],
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"requests":[{"id":"JFK query","request":{"query":{"match_all":{}}},"ratings":[]}],"metric":{"precision":{"k":20,"relevant_rating_threshold":1,"ignore_unlabeled":false}}}' "$ELASTICSEARCH_URL/my-index-000001/_rank_eval"
{
"requests": [
{
"id": "JFK query",
"request": { "query": { "match_all": {} } },
"ratings": []
} ],
"metric": {
"precision": {
"k": 20,
"relevant_rating_threshold": 1,
"ignore_unlabeled": false
}
}
}