2013-08-28 19:24:34 -04:00
|
|
|
[[cluster-update-settings]]
|
|
|
|
== Cluster Update Settings
|
|
|
|
|
|
|
|
Allows to update cluster wide specific settings. Settings updated can
|
|
|
|
either be persistent (applied cross restarts) or transient (will not
|
|
|
|
survive a full cluster restart). Here is an example:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
curl -XPUT localhost:9200/_cluster/settings -d '{
|
|
|
|
"persistent" : {
|
|
|
|
"discovery.zen.minimum_master_nodes" : 2
|
2015-06-22 17:49:45 -04:00
|
|
|
}
|
|
|
|
}'
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
Or:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
curl -XPUT localhost:9200/_cluster/settings -d '{
|
|
|
|
"transient" : {
|
|
|
|
"discovery.zen.minimum_master_nodes" : 2
|
2015-06-22 17:49:45 -04:00
|
|
|
}
|
|
|
|
}'
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
The cluster responds with the settings updated. So the response for the
|
|
|
|
last example will be:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"persistent" : {},
|
|
|
|
"transient" : {
|
|
|
|
"discovery.zen.minimum_master_nodes" : "2"
|
2015-06-22 17:49:45 -04:00
|
|
|
}
|
|
|
|
}'
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
Cluster wide settings can be returned using:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
curl -XGET localhost:9200/_cluster/settings
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
|
2015-06-22 17:49:45 -04:00
|
|
|
A list of dynamically updatable settings can be found in the
|
|
|
|
<<modules,Modules>> documentation.
|
2014-06-25 14:54:22 -04:00
|
|
|
|