Marvin
Marvin

Reputation: 3095

What is the elastic API to view/set `index.refresh_interval`

I see that there is a setting for index delay index.refresh_interval

This is a dynamic setting, but not per-index. I can see per-index settings like,

GET /my-index/_settings

I can see some cluster wide settings like

GET /_cluster/settings

But neither shows that setting, and I can’t find how I would set that setting using an API. How can I display and set this setting?

Upvotes: 0

Views: 195

Answers (1)

Val
Val

Reputation: 217564

That setting is per index and you can see it like this (include_defaults will show the default value that is set if you haven't set any specific value):

GET /my-index/_settings?include_defaults=true

You can set a specific value dynamically with this call

PUT /my-index/_settings
{
   "index.refresh_interval": "1s"
}

Upvotes: 1

Related Questions