# Use NoMergePolicy for specific Index?

**URL:** <https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246>\
**Category:** Elasticsearch\
**Created:** [May 29, 2016, 12:46pm UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246 "2016-05-29T12:46:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![itplayer](https://avatars.discourse-cdn.com/v4/letter/i/d26b3c/32.png) [@itplayer](https://discuss.elastic.co/u/itplayer)\
**Post date:** [May 29, 2016, 12:46pm UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246/1 "2016-05-29T12:46:20Z")

</div>

How to set an Index to use NoMergePolicy provided by Lucene.  
In my case, I have an time-based index (daily) and this Index is not search often but update frequently in a day. I don't want ES to do merge for this index to reduce CPU and I/O loading caused by merge. Any idea?

---

<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:** [May 30, 2016, 12:42am UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246/2 "2016-05-30T00:42:46Z")

</div>

You can't modify that stuff in es. It used to have some settings for some  
merge policy stuff but never that one, iirc. Most of those settings have  
since been removed because they get people into more trouble then they got  
out of trouble.

---

<div class="post-metadata">

**Author:** ![itplayer](https://avatars.discourse-cdn.com/v4/letter/i/d26b3c/32.png) [@itplayer](https://discuss.elastic.co/u/itplayer)\
**Post date:** [May 30, 2016, 2:49am UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246/3 "2016-05-30T02:49:34Z")

</div>

Thanks for your reply. But I want to minimize merge and in my past experience, Lucene's NoMergePolicy could be a solution, so I just want to know if there is any chance to use this method.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [May 30, 2016, 1:53pm UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246/4 "2016-05-30T13:53:33Z")

</div>

Maybe another option would be to use time-based indices?

Disabling merging can be very dangerous so I doubt we will ever expose it.

---

<div class="post-metadata">

**Author:** ![itplayer](https://avatars.discourse-cdn.com/v4/letter/i/d26b3c/32.png) [@itplayer](https://discuss.elastic.co/u/itplayer)\
**Post date:** [June 2, 2016, 3:17am UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246/5 "2016-06-02T03:17:41Z")

</div>

OK, time-based index is one of my options but i just wondering why not expose suck a configuration to users since they have to responsible for their decision. 🙂

For the time-based index, i'd like to know when will a index being "idle(not actively)" in time-based scenario?

When a index being not actively seved, will IndexBuffer consumption reduce?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [June 2, 2016, 9:33am UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246/6 "2016-06-02T09:33:20Z")

</div>

> [@itplayer](#):
>
> i just wondering why not expose suck a configuration to users since they have to responsible for their decision.

🙂 You'd be surprised how many settings we removed because several users reported bugs that were side-effects of setting these expert settings. And they were not even as dangerous as disabling merges.

> [@itplayer](#):
>
> When a index being not actively seved, will IndexBuffer consumption reduce?

Yes. Elasticsearch periodically checks active shards, and only gives memory to the active shards.

> [@itplayer](#):
>
> For the time-based index, i'd like to know when will a index being "idle(not actively)" in time-based scenario?

For instance if you create daily indices, elasticsearch would consider all indices but the one for today idle.

---

<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 5, 2017, 10:46pm UTC](https://discuss.elastic.co/t/use-nomergepolicy-for-specific-index/51246/7 "2017-07-05T22:46:56Z")

</div>


