Skip to content

Commit 8109a2c

Browse files
authored
[DOCS] Reformat update index settings API docs (#45931)
1 parent 859e387 commit 8109a2c

File tree

1 file changed

+63
-16
lines changed

1 file changed

+63
-16
lines changed

docs/reference/indices/update-settings.asciidoc

+63-16
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
[[indices-update-settings]]
2-
=== Update Indices Settings
2+
=== Update index settings API
3+
++++
4+
<titleabbrev>Update index settings</titleabbrev>
5+
++++
36

4-
Change specific index level settings in real time.
5-
6-
The REST endpoint is `/_settings` (to update all indices) or
7-
`{index}/_settings` to update one (or more) indices settings.
8-
The body of the request includes the updated settings, for example:
7+
Changes an <<index-modules-settings,index setting>> in real time.
98

109
[source,js]
1110
--------------------------------------------------
@@ -19,7 +18,55 @@ PUT /twitter/_settings
1918
// CONSOLE
2019
// TEST[setup:twitter]
2120

22-
To reset a setting back to the default value, use `null`. For example:
21+
22+
[[update-index-settings-api-request]]
23+
==== {api-request-title}
24+
25+
`PUT /<index>/_settings`
26+
27+
28+
[[update-index-settings-api-path-params]]
29+
==== {api-path-parms-title}
30+
31+
include::{docdir}/rest-api/common-parms.asciidoc[tag=index]
32+
+
33+
To update a setting for all indices,
34+
use `_all` or exclude this parameter.
35+
36+
37+
[[update-index-settings-api-query-params]]
38+
==== {api-query-parms-title}
39+
40+
include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
41+
42+
include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
43+
+
44+
Defaults to `open`.
45+
46+
include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]
47+
48+
include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
49+
50+
`preserve_existing`::
51+
(Optional, boolean) If `true`, existing index settings remain unchanged.
52+
Defaults to `false`.
53+
54+
include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
55+
56+
57+
[[sample-api-query-params]]
58+
==== {api-query-parms-title}
59+
60+
`settings`::
61+
(Optional, <<index-modules-settings,index setting object>>) Configuration
62+
options for the index. See <<index-modules-settings>>.
63+
64+
[[sample-api-example]]
65+
==== {api-examples-title}
66+
67+
[[reset-index-setting]]
68+
===== Reset an index setting
69+
To revert a setting to the default value, use `null`. For example:
2370

2471
[source,js]
2572
--------------------------------------------------
@@ -38,9 +85,8 @@ indices can be found in <<index-modules>>.
3885
To preserve existing settings from being updated, the `preserve_existing`
3986
request parameter can be set to `true`.
4087

41-
[float]
4288
[[bulk]]
43-
==== Bulk Indexing Usage
89+
===== Bulk indexing usage
4490

4591
For example, the update settings API can be used to dynamically change
4692
the index from being more performant for bulk indexing, and then move it
@@ -86,16 +132,17 @@ POST /twitter/_forcemerge?max_num_segments=5
86132
// CONSOLE
87133
// TEST[continued]
88134

89-
[float]
90135
[[update-settings-analysis]]
91-
==== Updating Index Analysis
136+
===== Update index analysis
92137

93-
It is also possible to define new <<analysis,analyzers>> for the index.
94-
But it is required to <<indices-open-close,close>> the index
95-
first and <<indices-open-close,open>> it after the changes are made.
138+
You can only define new analyzers on closed indices.
96139

97-
For example if `content` analyzer hasn't been defined on `myindex` yet
98-
you can use the following commands to add it:
140+
To add an analyzer,
141+
you must close the index,
142+
define the analyzer,
143+
and reopen the index.
144+
For example,
145+
the following commands add the `content` analyzer to `myindex`:
99146

100147
[source,js]
101148
--------------------------------------------------

0 commit comments

Comments
 (0)