The update settings API

Elasticsearch lets us tune itself by specifying the 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. We can change both the per index setting and the cluster wide settings. However, you should remember that not all properties can be dynamically changed. If you try to alter these parameters, Elasticsearch will respond with a proper error.

The cluster settings API

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

The first one, transient, ...

Get Elasticsearch Server - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.