Skip to content

Commit 37c5208

Browse files
mzbeckChristoph Büscher
authored and
Christoph Büscher
committed
Update update-settings.asciidoc (#31378)
1 parent ac0125f commit 37c5208

File tree

1 file changed

+34
-30
lines changed

1 file changed

+34
-30
lines changed
Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
[[cluster-update-settings]]
22
== Cluster Update Settings
33

4-
Allows to update cluster wide specific settings. Settings updated can
5-
either be persistent (applied across restarts) or transient (will not
6-
survive a full cluster restart). Here is an example:
4+
Use this API to review and change cluster-wide settings.
5+
6+
To review cluster settings:
7+
8+
[source,js]
9+
--------------------------------------------------
10+
GET /_cluster/settings
11+
--------------------------------------------------
12+
// CONSOLE
13+
14+
Updates to settings can be persistent, meaning they apply across restarts, or transient, where they don't
15+
survive a full cluster restart. Here is an example of a persistent update:
716

817
[source,js]
918
--------------------------------------------------
@@ -16,7 +25,7 @@ PUT /_cluster/settings
1625
--------------------------------------------------
1726
// CONSOLE
1827

19-
Or:
28+
This update is transient:
2029

2130
[source,js]
2231
--------------------------------------------------
@@ -29,8 +38,7 @@ PUT /_cluster/settings?flat_settings=true
2938
--------------------------------------------------
3039
// CONSOLE
3140

32-
The cluster responds with the settings updated. So the response for the
33-
last example will be:
41+
The response to an update returns the changed setting, as in this response to the transient example:
3442

3543
[source,js]
3644
--------------------------------------------------
@@ -44,11 +52,14 @@ last example will be:
4452
--------------------------------------------------
4553
// TESTRESPONSE[s/\.\.\./"acknowledged": true,/]
4654

47-
Resetting persistent or transient settings can be done by assigning a
48-
`null` value. If a transient setting is reset, the persistent setting
49-
is applied if available. Otherwise Elasticsearch will fallback to the setting
50-
defined at the configuration file or, if not existent, to the default
51-
value. Here is an example:
55+
You can reset persistent or transient settings by assigning a
56+
`null` value. If a transient setting is reset, the first one of these values that is defined is applied:
57+
58+
* the persistent setting
59+
* the setting in the configuration file
60+
* the default value.
61+
62+
This example resets a setting:
5263

5364
[source,js]
5465
--------------------------------------------------
@@ -61,8 +72,7 @@ PUT /_cluster/settings
6172
--------------------------------------------------
6273
// CONSOLE
6374

64-
Reset settings will not be included in the cluster response. So
65-
the response for the last example will be:
75+
The response does not include settings that have been reset:
6676

6777
[source,js]
6878
--------------------------------------------------
@@ -74,8 +84,8 @@ the response for the last example will be:
7484
--------------------------------------------------
7585
// TESTRESPONSE[s/\.\.\./"acknowledged": true,/]
7686

77-
Settings can also be reset using simple wildcards. For instance to reset
78-
all dynamic `indices.recovery` setting a prefix can be used:
87+
You can also reset settings using wildcards. For example, to reset
88+
all dynamic `indices.recovery` settings:
7989

8090
[source,js]
8191
--------------------------------------------------
@@ -88,25 +98,19 @@ PUT /_cluster/settings
8898
--------------------------------------------------
8999
// CONSOLE
90100

91-
Cluster wide settings can be returned using:
92-
93-
[source,js]
94-
--------------------------------------------------
95-
GET /_cluster/settings
96-
--------------------------------------------------
97-
// CONSOLE
98101

99102
[float]
100-
=== Precedence of settings
103+
=== Order of Precedence
104+
105+
The order of precedence for cluster settings is:
101106

102-
Transient cluster settings take precedence over persistent cluster settings,
103-
which take precedence over settings configured in the `elasticsearch.yml`
104-
config file.
107+
1. transient cluster settings
108+
2. persistent cluster settings
109+
3. settings in the `elasticsearch.yml` configuration file.
105110

106-
For this reason it is preferrable to use the `elasticsearch.yml` file only
107-
for local configurations, and set all cluster-wider settings with the
111+
It's best to use the `elasticsearch.yml` file only
112+
for local configurations, and set all cluster-wide settings with the
108113
`settings` API.
109114

110-
A list of dynamically updatable settings can be found in the
111-
<<modules,Modules>> documentation.
115+
You can find the list of settings that you can dynamically update in <<modules,Modules>>.
112116

0 commit comments

Comments
 (0)