# Can I modify analysis setting of an exist index?

**URL:** <https://discuss.elastic.co/t/can-i-modify-analysis-setting-of-an-exist-index/34786>\
**Category:** Elasticsearch\
**Created:** [November 17, 2015, 10:33am UTC](https://discuss.elastic.co/t/can-i-modify-analysis-setting-of-an-exist-index/34786 "2015-11-17T10:33:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinyke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shinyke/32/587_2.png) [@shinyke](https://discuss.elastic.co/u/shinyke)\
**Post date:** [November 17, 2015, 10:33am UTC](https://discuss.elastic.co/t/can-i-modify-analysis-setting-of-an-exist-index/34786/1 "2015-11-17T10:33:17Z")

</div>

I want to edit analyzer setting of an exist index to add a lowercase filter, should I rebuild the index? or there is someway easier.

thx~

---

<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:** [November 17, 2015, 1:14pm UTC](https://discuss.elastic.co/t/can-i-modify-analysis-setting-of-an-exist-index/34786/2 "2015-11-17T13:14:05Z")

</div>

> [@shinyke](#):
>
> should I rebuild the index? or there is someway easier.

For now there is nothing easier. You do a scroll query that hits all the documents and then re-add them to another index with the analysis setup the way you want so you don't have to rebuild from your source application - but only do that if your source application is slower.

If you don't have a source application - like if you are doing logging data or something, the normal practice is to add the change in analysis to the template for creating the next day/week/month's index and just live with the difference until your data retention period has you deleting the old indexes.

---

<div class="post-metadata">

**Author:** ![yahnoosh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yahnoosh/32/6949_2.png) [@yahnoosh](https://discuss.elastic.co/u/yahnoosh)\
**Post date:** [December 31, 2015, 3:13am UTC](https://discuss.elastic.co/t/can-i-modify-analysis-setting-of-an-exist-index/34786/3 "2015-12-31T03:13:37Z")

</div>

While I understand why modifying existing analyzers doesn't make sense, I'm curious why adding new ones requires closing and opening the index. I've skimmed through the code and couldn't find the answer. I suspected that maybe Lucene requires all analyzers to be defined when the IndexWriter is being instantiated but it's not the case. I'd appreciate any help with this 🙂

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 31, 2015, 4:28am UTC](https://discuss.elastic.co/t/can-i-modify-analysis-setting-of-an-exist-index/34786/4 "2015-12-31T04:28:22Z")

</div>

It might have to do with the way analyzers are registered:

> <https://github.com/elastic/elasticsearch/pull/14355>

Ivan

---

<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, 11:27pm UTC](https://discuss.elastic.co/t/can-i-modify-analysis-setting-of-an-exist-index/34786/5 "2017-07-05T23:27:40Z")

</div>


