Dhiresh Jain
Dhiresh Jain

Reputation: 484

Removing an elasticsearch cluster default setting dynamically

I want to remove a default cluster setting. This is what I tried.

curl -XPUT localhost:9200/_cluster/settings  -H 'Content-Type: application/json' -d' 
{
  "transient": {
      "cluster.some_setting_has_default_value_only": null
    }
}
'

However, this does not work and I can still see the setting in localhost:9200/_cluster/settings?pretty&flat_settings&include_defaults.

On debugging I found that since this setting does not exist in the transient settings, it does not bother removing this setting and therefore the default value is still applied. I verified the same with persistent key too.

Upvotes: 0

Views: 332

Answers (1)

Val
Val

Reputation: 217324

You cannot remove a default setting. You can only override it either in the transient section (will not survive restart) or in the persistent section (will survive restart).

Upvotes: 1

Related Questions