Setting index_* permanently

So, i visited this link https://stackoverflow.com/questions/40104821/making-index-max-result-window-setting-persistent

I want to set index.max_result_window = 20000; and index.refresh_interval = 10s
3 days ago, i executed by using this command
curl -XPUT "http://localhost:9200/*/_settings" -d '{ "index" : { "max_result_window" : 20000 } }'

i just realize that max_result_window on new index is default again.

How do i set index.max_result_window = 20000; and index.refresh_interval = 10s permanently. My ES version is 5.6.13.
The new indes is created by Graylog2. I don't find that in Graylog2, only number of shard and number of replicas is provide by Graylog2.
Should i use cron job to execute curl -XPUT "http://localhost:9200/*/_settings" -d '{ "index" : { "max_result_window" : 20000 } }' at 00:00 ?

Someone suggest to use template here https://stackoverflow.com/a/40109721/10444058
But, is there another simple way ?

I did yesterday curl -XPUT "http://localhost:9200/_all/_settings" -d '{"index":{"max_result_window":"20000"}}'
It works fine. But today, the new index is created. After i check by using curl -X GET "localhost:9200/20181115/_settings/", refresh_interval is disappear. How do i setting it permanently ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.