From ffeffa537997a1159c7773c2ac171fb30c015b74 Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Mon, 26 Jul 2021 10:09:38 -0400 Subject: [PATCH 1/2] [DOCS] Update index template API docs for data stream aliases With #73867, you can use component and index templates to add data stream aliases. --- docs/reference/indices/put-component-template.asciidoc | 5 +++-- docs/reference/indices/put-index-template.asciidoc | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/reference/indices/put-component-template.asciidoc b/docs/reference/indices/put-component-template.asciidoc index 31de9002a33ee..8c6756c496a18 100644 --- a/docs/reference/indices/put-component-template.asciidoc +++ b/docs/reference/indices/put-component-template.asciidoc @@ -132,8 +132,9 @@ This is the template to be applied, may optionally include a `mappings`, [%collapsible%open] ==== `aliases`:: -(Optional, object of objects) Aliases for the index. If an index template -includes `data_stream`, this parameter is not supported. +(Optional, object of objects) Aliases to add. ++ +include::{es-repo-dir}/indices/put-index-template.asciidoc[tag=template-ds-alias] + include::{es-repo-dir}/indices/create-index.asciidoc[tag=aliases-props] diff --git a/docs/reference/indices/put-index-template.asciidoc b/docs/reference/indices/put-index-template.asciidoc index 8968cccbb9118..4b830c6b2f083 100644 --- a/docs/reference/indices/put-index-template.asciidoc +++ b/docs/reference/indices/put-index-template.asciidoc @@ -137,8 +137,13 @@ Template to be applied. It may optionally include an `aliases`, `mappings`, or [%collapsible%open] ==== `aliases`:: -(Optional, object of objects) Aliases for the index. If the index template -includes `data_stream`, this parameter is not supported. +(Optional, object of objects) Aliases to add. ++ +// tag::template-ds-alias[] +If the index template includes a `data_stream` object, these are data stream +aliases. Otherwise, these are index aliases. Data stream aliases ignore the +`index_routing`, `routing`, and `search_routing` options. +// end::template-ds-alias[] + include::{es-repo-dir}/indices/create-index.asciidoc[tag=aliases-props] From 0f2eec3d709be502d004eb95d6f97b8bbd3f0ab3 Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Mon, 26 Jul 2021 10:27:06 -0400 Subject: [PATCH 2/2] Clarify date math support --- docs/reference/indices/create-index.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/indices/create-index.asciidoc b/docs/reference/indices/create-index.asciidoc index e81e52aaea664..d2e973261f4ea 100644 --- a/docs/reference/indices/create-index.asciidoc +++ b/docs/reference/indices/create-index.asciidoc @@ -77,7 +77,7 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms] .Properties of `aliases` objects ======= ``:: -(Required, object) The key is the alias name. Supports +(Required, object) The key is the alias name. Index alias names support <>. + The object body contains options for the alias. Supports an empty object.