1
1
[[cluster-update-settings]]
2
2
== Cluster Update Settings
3
3
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:
7
16
8
17
[source,js]
9
18
--------------------------------------------------
@@ -16,7 +25,7 @@ PUT /_cluster/settings
16
25
--------------------------------------------------
17
26
// CONSOLE
18
27
19
- Or :
28
+ This update is transient :
20
29
21
30
[source,js]
22
31
--------------------------------------------------
@@ -29,8 +38,7 @@ PUT /_cluster/settings?flat_settings=true
29
38
--------------------------------------------------
30
39
// CONSOLE
31
40
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:
34
42
35
43
[source,js]
36
44
--------------------------------------------------
@@ -44,11 +52,14 @@ last example will be:
44
52
--------------------------------------------------
45
53
// TESTRESPONSE[s/\.\.\./"acknowledged": true,/]
46
54
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:
52
63
53
64
[source,js]
54
65
--------------------------------------------------
@@ -61,8 +72,7 @@ PUT /_cluster/settings
61
72
--------------------------------------------------
62
73
// CONSOLE
63
74
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:
66
76
67
77
[source,js]
68
78
--------------------------------------------------
@@ -74,8 +84,8 @@ the response for the last example will be:
74
84
--------------------------------------------------
75
85
// TESTRESPONSE[s/\.\.\./"acknowledged": true,/]
76
86
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 :
79
89
80
90
[source,js]
81
91
--------------------------------------------------
@@ -88,25 +98,19 @@ PUT /_cluster/settings
88
98
--------------------------------------------------
89
99
// CONSOLE
90
100
91
- Cluster wide settings can be returned using:
92
-
93
- [source,js]
94
- --------------------------------------------------
95
- GET /_cluster/settings
96
- --------------------------------------------------
97
- // CONSOLE
98
101
99
102
[float]
100
- === Precedence of settings
103
+ === Order of Precedence
104
+
105
+ The order of precedence for cluster settings is:
101
106
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.
105
110
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
108
113
`settings` API.
109
114
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>>.
112
116
0 commit comments