diff --git a/docs/reference/api-conventions.asciidoc b/docs/reference/api-conventions.asciidoc index 2958c370b25..be44afe607b 100644 --- a/docs/reference/api-conventions.asciidoc +++ b/docs/reference/api-conventions.asciidoc @@ -13,14 +13,21 @@ API, unless otherwise specified. * <> [[multi-index]] -=== Multiple indices +=== Multi-target syntax -Most APIs that refer to an `index` parameter support execution across multiple indices, -using simple `test1,test2,test3` notation (or `_all` for all indices). It also -supports wildcards, for example: `test*` or `*test` or `te*t` or `*test*`, and the -ability to "exclude" (`-`), for example: `test*,-test3`. +Most APIs that accept a ``, ``, or `` request path +parameter also support _multi-target syntax_. -All multi index APIs support the following url query string parameters: +In multi-target syntax, you can use a comma-separated list to execute a request across multiple resources, such as +data streams, indices, or index aliases: `test1,test2,test3`. You can also use +https://en.wikipedia.org/wiki/Glob_(programming)[glob-like] wildcard (`*`) +expressions to target any +resources that match the pattern: `test*` or `*test` or `te*t` or `*test*. + +You can exclude targets using the `-` character: `test*,-test3`. + +Multi-target APIs that can target indices support the following query +string parameters: include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable] @@ -30,12 +37,14 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards] The defaults settings for the above parameters depend on the API being used. -Some multi index APIs also support the following url query string parameter: +Some multi-target APIs that can target indices also support the following query +string parameter: include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=ignore_throttled] -NOTE: Single index APIs such as the <> and the -<> do not support multiple indices. +NOTE: Single index APIs, such as the <> and +<>, do not support multi-target +syntax. [[date-math-index-names]] === Date math support in index names @@ -660,15 +669,14 @@ string parameter. === URL-based access control Many users use a proxy with URL-based access control to secure access to -Elasticsearch indices. For <>, +{es} data streams and indices. For <>, <>, and <> requests, the user has -the choice of specifying an index in the URL and on each individual request +the choice of specifying a data stream or index in the URL and on each individual request within the request body. This can make URL-based access control challenging. -To prevent the user from overriding the index which has been specified in the -URL, add this setting to the `elasticsearch.yml` file: +To prevent the user from overriding the data stream or index specified in the +URL, set `rest.action.multi.allow_explicit_index` to `false` in `elasticsearch.yml`. - rest.action.multi.allow_explicit_index: false -The default value is `true`, but when set to `false`, Elasticsearch will -reject requests that have an explicit index specified in the request body. +This causes {es} to +reject requests that explicitly specfiy a data stream or index in the request body. diff --git a/docs/reference/search.asciidoc b/docs/reference/search.asciidoc index 9f7f36e179f..4ece1b36d03 100644 --- a/docs/reference/search.asciidoc +++ b/docs/reference/search.asciidoc @@ -1,7 +1,7 @@ [[search]] == Search APIs -Most search APIs are <>, with the +Most search APIs support <>, with the exception of the <> endpoints. [float] diff --git a/docs/reference/snapshot-restore/restore-snapshot.asciidoc b/docs/reference/snapshot-restore/restore-snapshot.asciidoc index 5fc592c4363..a7358f03cf4 100644 --- a/docs/reference/snapshot-restore/restore-snapshot.asciidoc +++ b/docs/reference/snapshot-restore/restore-snapshot.asciidoc @@ -33,7 +33,7 @@ By default, all indices in the snapshot are restored, and the cluster state is *not* restored. It's possible to select indices that should be restored as well as to allow the global cluster state from being restored by using `indices` and `include_global_state` options in the restore request body. The list of indices -supports <>. The `rename_pattern` +supports <>. The `rename_pattern` and `rename_replacement` options can be also used to rename indices on restore using regular expression that supports referencing the original text as explained diff --git a/docs/reference/snapshot-restore/take-snapshot.asciidoc b/docs/reference/snapshot-restore/take-snapshot.asciidoc index dda5ab9d581..495b107b600 100644 --- a/docs/reference/snapshot-restore/take-snapshot.asciidoc +++ b/docs/reference/snapshot-restore/take-snapshot.asciidoc @@ -52,7 +52,7 @@ PUT /_snapshot/my_backup/snapshot_2?wait_for_completion=true // TEST[skip:cannot complete subsequent snapshot] The list of indices that should be included into the snapshot can be specified using the `indices` parameter that -supports <>, although the options which control the behavior of multi index syntax +supports <>, although the options which control the behavior of multi index syntax must be supplied in the body of the request, rather than as request parameters. The snapshot request also supports the `ignore_unavailable` option. Setting it to `true` will cause indices that do not exist to be ignored during snapshot creation. By default, when `ignore_unavailable` option is not set and an index is missing the snapshot request will fail. diff --git a/docs/reference/sql/language/indices.asciidoc b/docs/reference/sql/language/indices.asciidoc index 78834470df5..2892f1e22bd 100644 --- a/docs/reference/sql/language/indices.asciidoc +++ b/docs/reference/sql/language/indices.asciidoc @@ -9,7 +9,7 @@ [float] ==== {es} multi-index -The {es} notation for enumerating, including or excluding <> +The {es} notation for enumerating, including or excluding <> is supported _as long_ as it is quoted or escaped as a table identifier. For example: diff --git a/docs/reference/sql/language/syntax/commands/show-tables.asciidoc b/docs/reference/sql/language/syntax/commands/show-tables.asciidoc index 7c6127a6bc3..663ec46b6df 100644 --- a/docs/reference/sql/language/syntax/commands/show-tables.asciidoc +++ b/docs/reference/sql/language/syntax/commands/show-tables.asciidoc @@ -27,7 +27,7 @@ patterns. include-tagged::{sql-specs}/docs/docs.csv-spec[showTables] ---- -Match multiple indices by using {es} <> +Match multiple indices by using {es} <> notation: [source, sql]