Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Reformat update index settings API docs #45931

Merged
merged 4 commits into from
Aug 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 55 additions & 10 deletions docs/reference/indices/update-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[[indices-update-settings]]
=== Update Indices Settings
=== Update index settings API
++++
<titleabbrev>Update index settings</titleabbrev>
++++

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 <<index-modules-settings,index setting>> in real time.

[source,js]
--------------------------------------------------
Expand All @@ -19,6 +18,54 @@ PUT /twitter/_settings
// CONSOLE
// TEST[setup:twitter]


[[update-index-settings-api-request]]
==== {api-request-title}

`PUT /<index>/_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, <<index-modules-settings,index setting object>>) Configuration
options for the index. See <<index-modules-settings>>.

[[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:
jrodewig marked this conversation as resolved.
Show resolved Hide resolved

[source,js]
Expand All @@ -38,9 +85,8 @@ indices can be found in <<index-modules>>.
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
Expand Down Expand Up @@ -86,9 +132,8 @@ POST /twitter/_forcemerge?max_num_segments=5
// CONSOLE
// TEST[continued]

[float]
[[update-settings-analysis]]
==== Updating Index Analysis
===== Update index analysis
jrodewig marked this conversation as resolved.
Show resolved Hide resolved

It is also possible to define new <<analysis,analyzers>> for the index.
But it is required to <<indices-open-close,close>> the index
Expand Down