diff --git a/docs/reference/indices/update-settings.asciidoc b/docs/reference/indices/update-settings.asciidoc index 9962182edadcb..d959af25b91ed 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,7 +18,55 @@ PUT /twitter/_settings // CONSOLE // TEST[setup:twitter] -To reset a setting back to the default value, use `null`. For example: + +[[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 revert a setting 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,16 +132,17 @@ 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 -first and <> it after the changes are made. +You can only define new analyzers on closed indices. -For example if `content` analyzer hasn't been defined on `myindex` yet -you can use the following commands to add it: +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] --------------------------------------------------