From 87fb67829071760a0d88c2068996223e840d0d68 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Fri, 23 Aug 2019 15:57:28 -0400 Subject: [PATCH 1/4] [DOCS] Reformat update index settings API docs --- .../indices/update-settings.asciidoc | 65 ++++++++++++++++--- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/docs/reference/indices/update-settings.asciidoc b/docs/reference/indices/update-settings.asciidoc index 9962182edadcb..3ea61afad13fe 100644 --- a/docs/reference/indices/update-settings.asciidoc +++ b/docs/reference/indices/update-settings.asciidoc @@ -1,11 +1,10 @@ [[indices-update-settings]] -=== Update Indices Settings +=== Update index settings API +++++ +Update index settings +++++ -Change specific index level settings in real time. - -The REST endpoint is `/_settings` (to update all indices) or -`{index}/_settings` to update one (or more) indices settings. -The body of the request includes the updated settings, for example: +Changes an <> in real time. [source,js] -------------------------------------------------- @@ -19,6 +18,54 @@ PUT /twitter/_settings // CONSOLE // TEST[setup:twitter] + +[[update-index-settings-api-request]] +==== {api-request-title} + +`PUT //_settings` + + +[[update-index-settings-api-path-params]] +==== {api-path-parms-title} + +include::{docdir}/rest-api/common-parms.asciidoc[tag=index] ++ +To update a setting for all indices, +use `_all` or exclude this parameter. + + +[[update-index-settings-api-query-params]] +==== {api-query-parms-title} + +include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards] ++ +Defaults to `open`. + +include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable] + +`preserve_existing`:: +(Optional, boolean) If `true`, existing index settings remain unchanged. +Defaults to `false`. + +include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms] + + +[[sample-api-query-params]] +==== {api-query-parms-title} + +`settings`:: +(Optional, <>) Configuration +options for the index. See <>. + +[[sample-api-example]] +==== {api-examples-title} + +[[reset-index-setting]] +===== Reset an index setting To reset a setting back to the default value, use `null`. For example: [source,js] @@ -38,9 +85,8 @@ indices can be found in <>. To preserve existing settings from being updated, the `preserve_existing` request parameter can be set to `true`. -[float] [[bulk]] -==== Bulk Indexing Usage +===== Bulk indexing usage For example, the update settings API can be used to dynamically change the index from being more performant for bulk indexing, and then move it @@ -86,9 +132,8 @@ POST /twitter/_forcemerge?max_num_segments=5 // CONSOLE // TEST[continued] -[float] [[update-settings-analysis]] -==== Updating Index Analysis +===== Update index analysis It is also possible to define new <> for the index. But it is required to <> the index From f2ce13aeecf91a5e2c4b0d7eb743d3e6bbcf55a3 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Tue, 27 Aug 2019 08:51:40 -0400 Subject: [PATCH 2/4] Change reset to revert --- docs/reference/indices/update-settings.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/indices/update-settings.asciidoc b/docs/reference/indices/update-settings.asciidoc index 3ea61afad13fe..9ca23219a7b34 100644 --- a/docs/reference/indices/update-settings.asciidoc +++ b/docs/reference/indices/update-settings.asciidoc @@ -66,7 +66,7 @@ options for the index. See <>. [[reset-index-setting]] ===== Reset an index setting -To reset a setting back to the default value, use `null`. For example: +To revert a setting to the default value, use `null`. For example: [source,js] -------------------------------------------------- From 5ad4357899b2daebdf156d2d5bbabf26a17f76f2 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Tue, 27 Aug 2019 08:53:19 -0400 Subject: [PATCH 3/4] Change "Update index analysis" paragraphs --- docs/reference/indices/update-settings.asciidoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/reference/indices/update-settings.asciidoc b/docs/reference/indices/update-settings.asciidoc index 9ca23219a7b34..e86d1eb60ae79 100644 --- a/docs/reference/indices/update-settings.asciidoc +++ b/docs/reference/indices/update-settings.asciidoc @@ -135,12 +135,14 @@ POST /twitter/_forcemerge?max_num_segments=5 [[update-settings-analysis]] ===== Update index analysis -It is also possible to define new <> for the index. -But it is required to <> the index -first and <> it after the changes are made. - -For example if `content` analyzer hasn't been defined on `myindex` yet -you can use the following commands to add it: +You can only define new analyzers on closed indices. + +To add an analyzer, +you must close the index, +define the analyzer, +and reopen the index. +For example, +the following commands add the content analyzer to `myindex`: [source,js] -------------------------------------------------- From 03201ce75eda0e91ad7d8f48f90a1e490b93076a Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Tue, 27 Aug 2019 08:54:16 -0400 Subject: [PATCH 4/4] Add literals --- docs/reference/indices/update-settings.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/indices/update-settings.asciidoc b/docs/reference/indices/update-settings.asciidoc index e86d1eb60ae79..d959af25b91ed 100644 --- a/docs/reference/indices/update-settings.asciidoc +++ b/docs/reference/indices/update-settings.asciidoc @@ -142,7 +142,7 @@ you must close the index, define the analyzer, and reopen the index. For example, -the following commands add the content analyzer to `myindex`: +the following commands add the `content` analyzer to `myindex`: [source,js] --------------------------------------------------