stack es count cli command
elastic stack es count [options]
Count search results.
--indexstring-
A comma-separated list of data streams, indices, and aliases to search. It supports wildcards (
*). To search all data streams and indices, omit this parameter or use*or_all.Repeatable: pass
--indexmultiple times to supply more than one value --[no-]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- The analyzer to use for the query string. This parameter can be used only when the
qquery string parameter is specified. --[no-]analyze-wildcard- If
true, wildcard and prefix queries are analyzed. This parameter can be used only when theqquery string parameter is specified. --default-operatorstring- The default operator for query string query:
andoror. This parameter can be used only when theqquery string parameter is specified. --dfstring- The field to use as a default when no field prefix is given in the query string. This parameter can be used only when the
qquery string parameter is specified. --expand-wildcardsstring-
The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. It supports comma-separated values, such as
open,hidden.Repeatable: pass
--expand-wildcardsmultiple times to supply more than one value --[no-]ignore-throttled- If
true, concrete, expanded, or aliased indices are ignored when frozen. - 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. --[no-]lenient- If
true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can be used only when theqquery string parameter is specified. --min-scorenumber- The minimum
_scorevalue that documents must have to be included in the result. --preferencestring- The node or shard the operation should be performed on. By default, it is random.
--routingstring-
A custom value used to route operations to a specific shard.
Repeatable: pass
--routingmultiple times to supply more than one value --terminate-afternumber- The 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. IMPORTANT: Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
--qstring- The query in Lucene query string syntax. This parameter cannot be used with a request body.
--querystring- Defines the search query using Query DSL. A request body query cannot be used with the
qquery string parameter.
--input-filestring- path to a JSON file to use as command input
-V--[no-]version- Print the Elastic CLI version
--config-filestring- path to a config file (default: ~/.elasticrc.yml)
--use-contextstring- override the active context from the config file
--command-profilestring- restrict available commands to a deployment profile (serverless, stack, default)
--[no-]json- output as JSON
--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}}")
--[no-]dry-run-
validate all inputs and exit without performing any action (preview changes without applying them)