stack es knn-eval cli command
elastic stack es knn-eval \
--field <field> \
--k <k> \
--query-source <query-source> \
--knn-settings <knn-settings> \
--index <index> \
[options]
Evaluate kNN search settings.
Behaviour flags:
--dry-run — validate all inputs and exit without performing any action
--fieldstringrequired- The
dense_vectorfield to evaluate. --knumberrequired- The number of nearest neighbors to compute the recall for, from 1 to 1000.
--query-sourcestringrequired- The source of the query vectors.
--knn-settingsstring[]required-
The kNN search settings to evaluate, from 1 to 32 unique entries.
Repeatable: pass
--knn-settingsmultiple times to supply more than one value --indexstringrequired-
A comma-separated list of index names to search.
Repeatable: pass
--indexmultiple times to supply more than one value - If
false, the request returns an error if it targets a missing or closed index. --allow-no-indices- 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. --expand-wildcardsenum-
The type of index that wildcard patterns can match. It supports comma-separated values, such as
open,hidden.Values: all, open, closed, hidden, none
Repeatable: pass
--expand-wildcardsmultiple times to supply more than one value --wait-for-completion- If
true, the request waits for the evaluation to complete. A large evaluation can run for minutes, and closing the connection, for example because of a client or proxy timeout, cancels it. Iffalse, the request returns a task identifier, and stores the completed response for retrieval through the task management API. --baselinestring- The settings of the search that the
knn_settingsentries are compared with. If not specified, it uses avisit_percentageof 20 and arescore_vector.oversampleof 100. --allow-exact-baseline- If
true, thebaselinecan beexact. An exact baseline compares every vector at full precision, and can severely slow down other searches. --error-trace- When set to
trueElasticsearch will include the full stack trace of errors when they occur. --filter-pathstring-
Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.
Repeatable: pass
--filter-pathmultiple times to supply more than one value --human- When set to
truewill return statistics in a format suitable for humans. For example"exists_time": "1h"for humans and"exists_time_in_millis": 3600000for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. --pretty- If set to
truethe returned JSON will be "pretty-formatted". Only use this option for debugging only. --input-filestring- path to a JSON file to use as command input
--dry-run- validate all inputs and exit without performing any action (preview changes without applying them)
--no-validate- skip input validation and send the request as-is
--output-fieldsstring- comma-separated list of fields to include in output (dot-notation supported)
--output-templatestring- Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--json-
output as JSON