Most APIs that accept a
<target> request path
parameter also support multi-target syntax.
In multi-target syntax, you can use a comma-separated list to run a request on
multiple resources, such as data streams, indices, or index aliases:
test1,test2,test3. You can also use glob-like
*) expressions to target resources that match a pattern:
You can exclude targets using the
Index aliases are resolved after wildcard expressions. This can
result in a request that targets an excluded alias. For example, if
an index alias, the pattern
test*,-test3 still targets the indices for
test3. To avoid this, exclude the concrete indices for the alias instead.
Multi-target APIs that can target indices support the following query string parameters:
(Optional, Boolean) If
true, missing or closed indices are not included in the response. Defaults to
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. For example, a request targeting
foo*,bar*returns an error if an index starts with
foobut no index starts with
(Optional, string) Controls what kind of indices that wildcard expressions can expand to. Multiple values are accepted when separated by a comma, as in
open,hidden. Valid values are:
- Expand to open and closed indices, including hidden indices.
- Expand only to open indices.
- Expand only to closed indices.
Expansion of wildcards will include hidden indices.
Must be combined with
closed, or both.
- Wildcard expressions are not accepted.
The defaults settings for the above parameters depend on the API being used.
Some multi-target APIs that can target indices also support the following query string parameter:
(Optional, Boolean) If
true, concrete, expanded or aliased indices are ignored when frozen. Defaults to
Indices that are configured to be hidden with the index.hidden setting are
excluded from mult-target queries by default.
To include hidden indices, you must specify the
The backing indices for data streams are hidden indices, and some features like machine learning store information in hidden indices.
Global index templates that match all indices are not applied to hidden indices.
Elasticsearch modules and plugins can store configuration and state information in internal system indices. You should not directly access or modify system indices as they contain data essential to the operation of the system.
Direct access to system indices is deprecated and will no longer be allowed in the next major version.