update-settings.asciidoc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. [[cluster-update-settings]]
  2. == Cluster Update Settings
  3. Allows to update cluster wide specific settings. Settings updated can
  4. either be persistent (applied cross restarts) or transient (will not
  5. survive a full cluster restart). Here is an example:
  6. [source,js]
  7. --------------------------------------------------
  8. curl -XPUT localhost:9200/_cluster/settings -d '{
  9. "persistent" : {
  10. "discovery.zen.minimum_master_nodes" : 2
  11. }
  12. }'
  13. --------------------------------------------------
  14. Or:
  15. [source,js]
  16. --------------------------------------------------
  17. curl -XPUT localhost:9200/_cluster/settings -d '{
  18. "transient" : {
  19. "discovery.zen.minimum_master_nodes" : 2
  20. }
  21. }'
  22. --------------------------------------------------
  23. The cluster responds with the settings updated. So the response for the
  24. last example will be:
  25. [source,js]
  26. --------------------------------------------------
  27. {
  28. "persistent" : {},
  29. "transient" : {
  30. "discovery.zen.minimum_master_nodes" : "2"
  31. }
  32. }'
  33. --------------------------------------------------
  34. Cluster wide settings can be returned using:
  35. [source,js]
  36. --------------------------------------------------
  37. curl -XGET localhost:9200/_cluster/settings
  38. --------------------------------------------------
  39. A list of dynamically updatable settings can be found in the
  40. <<modules,Modules>> documentation.