# Can we add a normalizer while adding a new field to an existing index. I tried to but it doesn't seem to be working

**URL:** <https://discuss.elastic.co/t/can-we-add-a-normalizer-while-adding-a-new-field-to-an-existing-index-i-tried-to-but-it-doesnt-seem-to-be-working/184543>\
**Category:** Elasticsearch\
**Created:** [June 6, 2019, 9:38am UTC](https://discuss.elastic.co/t/can-we-add-a-normalizer-while-adding-a-new-field-to-an-existing-index-i-tried-to-but-it-doesnt-seem-to-be-working/184543 "2019-06-06T09:38:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aastha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aastha/32/47631_2.png) [@aastha](https://discuss.elastic.co/u/aastha)\
**Post date:** [June 6, 2019, 9:38am UTC](https://discuss.elastic.co/t/can-we-add-a-normalizer-while-adding-a-new-field-to-an-existing-index-i-tried-to-but-it-doesnt-seem-to-be-working/184543/1 "2019-06-06T09:38:05Z")

</div>

The index is already in elasticsearch, I'm trying to add a new field "my\_field" with a custom analyzer but this doesn't work.  
PUT my\_index  
{  
"settings": {  
"analysis": {  
"normalizer": {  
"my\_normalizer": {  
"type": "custom",  
"filter": ["lowercase"]  
}  
}  
}  
},  
"mappings": {  
"default": {  
"properties": {  
"my\_field": {  
"type": "keyword",  
"normalizer": "my\_normalizer"  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)\
**Post date:** [June 6, 2019, 1:42pm UTC](https://discuss.elastic.co/t/can-we-add-a-normalizer-while-adding-a-new-field-to-an-existing-index-i-tried-to-but-it-doesnt-seem-to-be-working/184543/2 "2019-06-06T13:42:56Z")

</div>

I think it's not possible to add a new analyzer "on the fly".  
One solution, is to create a new index with your new analyzer and field. Then you can reindex  
your old index into the new one.

[https://www.elastic.co/guide/en/elasticsearch/reference/7.1/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.1/docs-reindex.html)

bye,  
Xavier

---

<div class="post-metadata">

**Author:** ![aastha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aastha/32/47631_2.png) [@aastha](https://discuss.elastic.co/u/aastha)\
**Post date:** [June 13, 2019, 5:47pm UTC](https://discuss.elastic.co/t/can-we-add-a-normalizer-while-adding-a-new-field-to-an-existing-index-i-tried-to-but-it-doesnt-seem-to-be-working/184543/3 "2019-06-13T17:47:00Z")

</div>

Okay. Doesn't it make sense to allow adding a normalizer while adding new fields? Is there any reason, why it is restricted?

---

<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 11, 2019, 5:47pm UTC](https://discuss.elastic.co/t/can-we-add-a-normalizer-while-adding-a-new-field-to-an-existing-index-i-tried-to-but-it-doesnt-seem-to-be-working/184543/4 "2019-07-11T17:47:01Z")

</div>

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