# Setting index\_\* permanently

**URL:** <https://discuss.elastic.co/t/setting-index-permanently/156583>\
**Category:** Elasticsearch\
**Created:** [November 14, 2018, 5:32am UTC](https://discuss.elastic.co/t/setting-index-permanently/156583 "2018-11-14T05:32:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![merceskoba](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@merceskoba](https://discuss.elastic.co/u/merceskoba)\
**Post date:** [November 14, 2018, 5:32am UTC](https://discuss.elastic.co/t/setting-index-permanently/156583/1 "2018-11-14T05:32:37Z")

</div>

So, i visited this link [https://stackoverflow.com/questions/40104821/making-index-max-result-window-setting-persistent](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](https://stackoverflow.com/a/40109721/10444058)  
But, is there another simple way ?

---

<div class="post-metadata">

**Author:** ![merceskoba](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@merceskoba](https://discuss.elastic.co/u/merceskoba)\
**Post date:** [November 15, 2018, 2:29am UTC](https://discuss.elastic.co/t/setting-index-permanently/156583/2 "2018-11-15T02:29:17Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 13, 2018, 2:29am UTC](https://discuss.elastic.co/t/setting-index-permanently/156583/3 "2018-12-13T02:29:34Z")

</div>

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