stack es fleet search cli command
elastic stack es fleet search --index <index> [options]
Run a Fleet search.
Behaviour flags:
--dry-run — validate all inputs and exit without performing any action
--indexstringrequired- A single target to search. If the target is an index alias, it must resolve to a single index.
--allow-no-indices- A setting that does two separate checks on the index expression.
If
false, the request returns an error (1) if any wildcard expression (including_alland*) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. Iftrue, index expressions that resolve to no indices are allowed and the request returns an empty result. --analyzerstring--analyze-wildcard--batched-reduce-sizenumber--ccs-minimize-roundtrips--default-operatorenum-
Values: and, or
--dfstring--docvalue-fieldsstring[]-
Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in the hits.fields property of the response.
Repeatable: pass
--docvalue-fieldsmultiple times to supply more than one value --expand-wildcardsenum-
Values: all, open, closed, hidden, none
Repeatable: pass
--expand-wildcardsmultiple times to supply more than one value --explain- If true, returns detailed information about score computation as part of a hit.
--ignore-throttled- If
false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. Iftrue, unavailable concrete targets are silently ignored. --lenient--max-concurrent-shard-requestsnumber--preferencestring--pre-filter-shard-sizenumber--request-cache--routingstring-
Repeatable: pass
--routingmultiple times to supply more than one value --scrollstring--search-typeenum-
Values: query_then_fetch, dfs_query_then_fetch
--statsstring[]-
Stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. You can retrieve these stats using the indices stats API.
Repeatable: pass
--statsmultiple times to supply more than one value --stored-fieldsstring-
List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the _source parameter defaults to false. You can pass _source: true to return both source fields and stored fields in the search response.
Repeatable: pass
--stored-fieldsmultiple times to supply more than one value --suggest-fieldstring- Specifies which field to use for suggestions.
--suggest-modeenum-
Values: missing, popular, always
--suggest-sizenumber--suggest-textstring- The source text for which the suggestions should be returned.
--terminate-afternumber- Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Defaults to 0, which does not terminate query execution early.
--timeoutstring- Specifies the period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.
--track-total-hitsnumber- Number of hits matching the query to count accurately. If true, the exact number of hits is returned at the cost of some performance. If false, the response does not include the total number of hits matching the query. Defaults to 10,000 hits.
--track-scores- If true, calculate and return document scores, even if the scores are not used for sorting.
--typed-keys--rest-total-hits-as-int--version- If true, returns document version as part of a hit.
--sourcestring- Indicates which source fields are returned for matching documents. These fields are returned in the hits._source property of the search response.
--source-excludesstring-
Repeatable: pass
--source-excludesmultiple times to supply more than one value --source-includesstring-
Repeatable: pass
--source-includesmultiple times to supply more than one value --seq-no-primary-term- If true, returns sequence number and primary term of the last modification of each hit. See Optimistic concurrency control.
--qstring--sizenumber- The number of hits to return. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.
--fromnumber- Starting document offset. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.
--sortstring-
Repeatable: pass
--sortmultiple times to supply more than one value --wait-for-checkpointsstring[]-
A comma separated list of checkpoints. When configured, the search API will only be executed on a shard after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause Elasticsearch to immediately execute the search.
Repeatable: pass
--wait-for-checkpointsmultiple times to supply more than one value --allow-partial-search-results- If true, returns partial results if there are shard request timeouts or shard failures.
If false, returns an error with no partial results.
Defaults to the configured cluster setting
search.default_allow_partial_results, which is true by default. --aggregationsstring--collapsestring--extstring- Configuration of search extensions defined by Elasticsearch plugins.
--highlightstring--indices-booststring[]-
Boosts the _score of documents from specified indices.
Repeatable: pass
--indices-boostmultiple times to supply more than one value --min-scorenumber- Minimum _score for matching documents. Documents with a lower _score are not included in search results and results collected by aggregations.
--post-filterstring--profile--querystring- Defines the search definition using the Query DSL.
--rescorestring-
Repeatable: pass
--rescoremultiple times to supply more than one value --script-fieldsstring- Retrieve a script evaluation (based on different fields) for each hit.
--search-afterstring[]-
Repeatable: pass
--search-aftermultiple times to supply more than one value --slicestring--fieldsstring[]-
Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.
Repeatable: pass
--fieldsmultiple times to supply more than one value --suggeststring--pitstring- Limits the search to a point in time (PIT). If you provide a PIT, you cannot specify an <index> in the request path.
--runtime-mappingsstring- Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.
--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)
--json-
output as JSON