O'Reilly logo

Elasticsearch Server Second Edition by Marek Rogoziński, Rafał Kuć

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The update settings API

Elasticsearch lets us tune it by specifying various parameters in the elasticsearch.yml file. But you should treat this file as the set of default values that can be changed in the runtime using the Elasticsearch REST API.

In order to set one of the properties, we need to use the HTTP PUT method and send a proper request to the _cluster/settings URI. However, we have two options: transient and permanent property settings.

The first one, transient, will set the property only until the first restart. In order to do this, we will send the following command:

curl -XPUT 'localhost:9200/_cluster/settings' -d '{
  "transient" : {
    "PROPERTY_NAME" : "PROPERTY_VALUE"
  }
}'

As you can see, in the preceding command, we used the object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required