[7.x] Adding new require_alias option to indexing requests (#58917) (#59769)

* Adding new `require_alias` option to indexing requests (#58917)

This commit adds the `require_alias` flag to requests that create new documents.

This flag, when `true` prevents the request from automatically creating an index. Instead, the destination of the request MUST be an alias.

When the flag is not set, or `false`, the behavior defaults to the `action.auto_create_index` settings.

This is useful when an alias is required instead of a concrete index.

closes https://github.com/elastic/elasticsearch/issues/55267
This commit is contained in:
Benjamin Trent 2020-07-17 10:24:58 -04:00 committed by GitHub
parent 65f6fb8e94
commit b7f30fc929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 447 additions and 36 deletions

View file

@ -592,6 +592,12 @@ such as `1264`.
A value of `-1` indicates {es} was unable to compute this number.
end::memory[]
tag::require-alias[]
`require_alias`::
(Optional, boolean) When true, this requires the destination to be an alias.
Defaults to false.
end::require-alias[]
tag::node-filter[]
`<node_filter>`::
(Optional, string)