From cf256341a80dfb927667b5919aa9d5e4819354e8 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 16 Jun 2021 11:53:37 +0100 Subject: [PATCH 1/2] Fix clone API settings docs bug In #74138 we noted that index settings aren't copied in a clone. In fact that's not true, we copy everything except explicitly-excluded ones, `number_of_replicas` and `auto_expand_replicas`. This fixes the mistake. --- docs/reference/indices/clone-index.asciidoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/reference/indices/clone-index.asciidoc b/docs/reference/indices/clone-index.asciidoc index 5b824bfff24ae..c7e0d8973027d 100644 --- a/docs/reference/indices/clone-index.asciidoc +++ b/docs/reference/indices/clone-index.asciidoc @@ -57,10 +57,15 @@ Use the clone index API to clone an existing index into a new index, where each original primary shard is cloned into a new primary shard in the new index. IMPORTANT: {es} doesn't apply index templates to the resulting index. The API -also doesn't copy index settings or metadata from the original index. Index -metadata includes aliases, {ilm-init} phase definitions, and {ccr-init} follower +also doesn't copy index metadata from the original index. Index metadata +includes aliases, {ilm-init} phase definitions, and {ccr-init} follower information. For example, if you clone a {ccr-init} follower index, the resulting clone won't be a follower index. ++ +The clone API copies most index settings from the source index to the resulting +index, with the exception of `index.number_of_replicas` and +`index.auto_expand_replicas`. To set the number of replicas in the resulting +index, configure these settings in the clone request. [[cloning-works]] ===== How cloning works From f527961f97e2d0923c3ec02d7e73ee6ceab004cb Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Wed, 16 Jun 2021 08:43:57 -0400 Subject: [PATCH 2/2] Fix formatting --- docs/reference/indices/clone-index.asciidoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/reference/indices/clone-index.asciidoc b/docs/reference/indices/clone-index.asciidoc index c7e0d8973027d..748b3adddd528 100644 --- a/docs/reference/indices/clone-index.asciidoc +++ b/docs/reference/indices/clone-index.asciidoc @@ -56,16 +56,19 @@ and then the previous write index can be cloned. Use the clone index API to clone an existing index into a new index, where each original primary shard is cloned into a new primary shard in the new index. -IMPORTANT: {es} doesn't apply index templates to the resulting index. The API +[IMPORTANT] +==== +{es} doesn't apply index templates to the resulting index. The API also doesn't copy index metadata from the original index. Index metadata includes aliases, {ilm-init} phase definitions, and {ccr-init} follower information. For example, if you clone a {ccr-init} follower index, the resulting clone won't be a follower index. -+ + The clone API copies most index settings from the source index to the resulting index, with the exception of `index.number_of_replicas` and `index.auto_expand_replicas`. To set the number of replicas in the resulting index, configure these settings in the clone request. +==== [[cloning-works]] ===== How cloning works