# Update merge settings pre-1.4 without downtime

**URL:** <https://discuss.elastic.co/t/update-merge-settings-pre-1-4-without-downtime/20174>\
**Category:** Elasticsearch\
**Created:** [October 10, 2014, 4:33am UTC](https://discuss.elastic.co/t/update-merge-settings-pre-1-4-without-downtime/20174 "2014-10-10T04:33:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Foy](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@Jonathan\_Foy](https://discuss.elastic.co/u/Jonathan_Foy)\
**Post date:** [October 10, 2014, 4:33am UTC](https://discuss.elastic.co/t/update-merge-settings-pre-1-4-without-downtime/20174/1 "2014-10-10T04:33:29Z")

</div>

Hello

Is there any way of changing the merge settings of a live index without  
downtime in ES versions prior to 1.4 (I'm on 1.1.1)?

After toying with some of the settings for quite a while (such as  
index.merge.policy.expunge\_deletes\_allowed and  
index.merge.policy.max\_merge\_at\_once\_explicit) I had come to the conclusion  
that they were NOT updating dynamically. A dive into the code, which also  
led to this issue  
[https://github.com/elasticsearch/elasticsearch/issues/7699](https://github.com/elasticsearch/elasticsearch/issues/7699), seems to  
indicate that prior to 1.4 merge settings are not really dynamically  
updateable, and instead would require restarting, closing/reopening an  
index, or perhaps relocating shards (the updated values are stored, but  
never seem to be applied). I'm looking in TieredMergePolicyProvider to get  
this information.

I'm planning on trying to update our cluster to 1.4 once it's stable, but  
until then it would be helpful to be able to tweak these settings as part  
of my battle against deleted document creep. So, am I missing something  
here, or is simply not possible right now?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [October 10, 2014, 11:18am UTC](https://discuss.elastic.co/t/update-merge-settings-pre-1-4-without-downtime/20174/2 "2014-10-10T11:18:10Z")

</div>

You could try switching merge policies and then switching back. I never  
tried that but I think it might work.

Nik  
On Oct 10, 2014 12:33 AM, "Jonathan Foy" [thefoy@gmail.com](mailto:thefoy@gmail.com) wrote:

> Hello
> 
> Is there any way of changing the merge settings of a live index without  
> downtime in ES versions prior to 1.4 (I'm on 1.1.1)?
> 
> After toying with some of the settings for quite a while (such as  
> index.merge.policy.expunge\_deletes\_allowed and  
> index.merge.policy.max\_merge\_at\_once\_explicit) I had come to the  
> conclusion that they were NOT updating dynamically. A dive into the code,  
> which also led to this issue  
> [https://github.com/elasticsearch/elasticsearch/issues/7699](https://github.com/elasticsearch/elasticsearch/issues/7699), seems to  
> indicate that prior to 1.4 merge settings are not really dynamically  
> updateable, and instead would require restarting, closing/reopening an  
> index, or perhaps relocating shards (the updated values are stored, but  
> never seem to be applied). I'm looking in TieredMergePolicyProvider to get  
> this information.
> 
> I'm planning on trying to update our cluster to 1.4 once it's stable, but  
> until then it would be helpful to be able to tweak these settings as part  
> of my battle against deleted document creep. So, am I missing something  
> here, or is simply not possible right now?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd2m1264o-C3Myow43%2BWctdcLqr7B68vDzVcxf-wNQJ5%3Dw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd2m1264o-C3Myow43%2BWctdcLqr7B68vDzVcxf-wNQJ5%3Dw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jonathan\_Foy](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@Jonathan\_Foy](https://discuss.elastic.co/u/Jonathan_Foy)\
**Post date:** [October 10, 2014, 1:44pm UTC](https://discuss.elastic.co/t/update-merge-settings-pre-1-4-without-downtime/20174/3 "2014-10-10T13:44:00Z")

</div>

Thanks for the response. However, you can't switch merge policies on the  
fly though if I'm not mistaken; if I remember right that definitely  
requires closing/reopening an index. From the docs  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-update-settings.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-update-settings.html),  
"A different merge policy can't be set."

I went ahead and tested it via the index \_settings API:  
curl -XPUT localhost:9200/my\_index/\_settings -d '{  
"index": {  
"merge.policy.type": "log\_doc"  
}  
}'  
{"error":"ElasticsearchIllegalArgumentException[Can't update non dynamic  
settings[[index.merge.policy.type]] for open  
indices[[my\_index\_20140709]]]","status":400}

Am I missing something?

On Friday, October 10, 2014 7:18:40 AM UTC-4, Nikolas Everett wrote:

> You could try switching merge policies and then switching back. I never  
> tried that but I think it might work.
> 
> Nik  
> On Oct 10, 2014 12:33 AM, "Jonathan Foy" \<[the...@gmail.com](mailto:the...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Hello
> > 
> > Is there any way of changing the merge settings of a live index without  
> > downtime in ES versions prior to 1.4 (I'm on 1.1.1)?
> > 
> > After toying with some of the settings for quite a while (such as  
> > index.merge.policy.expunge\_deletes\_allowed and  
> > index.merge.policy.max\_merge\_at\_once\_explicit) I had come to the  
> > conclusion that they were NOT updating dynamically. A dive into the code,  
> > which also led to this issue  
> > [https://github.com/elasticsearch/elasticsearch/issues/7699](https://github.com/elasticsearch/elasticsearch/issues/7699), seems to  
> > indicate that prior to 1.4 merge settings are not really dynamically  
> > updateable, and instead would require restarting, closing/reopening an  
> > index, or perhaps relocating shards (the updated values are stored, but  
> > never seem to be applied). I'm looking in TieredMergePolicyProvider to get  
> > this information.
> > 
> > I'm planning on trying to update our cluster to 1.4 once it's stable, but  
> > until then it would be helpful to be able to tweak these settings as part  
> > of my battle against deleted document creep. So, am I missing something  
> > here, or is simply not possible right now?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d59db65a-e467-45aa-a5bc-870c64dc8421%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ec13b815-c702-4120-a4ad-3fdef79d55cb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ec13b815-c702-4120-a4ad-3fdef79d55cb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:57am UTC](https://discuss.elastic.co/t/update-merge-settings-pre-1-4-without-downtime/20174/4 "2017-07-06T00:57:02Z")

</div>


