# Update mapping of index

**URL:** https://discuss.elastic.co/t/update-mapping-of-index/13067
**Category:** Elasticsearch
**Created:** [August 5, 2013, 7:26am UTC](https://discuss.elastic.co/t/update-mapping-of-index/13067 "2013-08-05T07:26:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hanish\_Bansal](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@Hanish\_Bansal](https://discuss.elastic.co/u/Hanish_Bansal)
#### Post date: [August 5, 2013, 7:26am UTC](https://discuss.elastic.co/t/update-mapping-of-index/13067/1 "2013-08-05T07:26:58Z")

</div>

Hi All,

I am trying to update mapping of an existing index "tweetindex" which has  
no data.

Initial mapping of "tweetindex "index is:

{  
"tweet" : {  
"\_source" : { "enabled" : false},  
"properties" : {  
"field1" : { "type" : "string", "index" :  
"not\_analyzed","store":"yes" },  
"field2" : { "type" : "string", "index" :  
"analyzed","store":"yes" }  
}  
}  
}

New mapping which i want is:

{  
"tweet" : {  
"\_source" : { "enabled" : false},  
"properties" : {  
"field1" : { "type" : "string", "index" :  
"no","store":"yes" },  
"field2" : { "type" : "string", "index" :  
"analyzed","store":"yes" }  
}  
}  
}

I want to update mapping of field1 from _not\_analyzed_ to _no_ But its  
throwing an exception:

{"error":"MergeMappingException[Merge failed with failures {[mapper  
[field1] has different index values, mapper [field1] has different  
tokenize values, mapper [field1] has different  
index\_analyzer]}]","status":400}

Any suggestion regarding this will be really helpful !!

--  
_Thanks & Regards_  
_Hanish Bansal_

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 5, 2013, 7:43am UTC](https://discuss.elastic.co/t/update-mapping-of-index/13067/2 "2013-08-05T07:43:09Z")

</div>

You have to reindex with a new type (or new index).

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 août 2013 à 09:26, Hanish Bansal [hanish.bansal.agarwal@gmail.com](mailto:hanish.bansal.agarwal@gmail.com) a écrit :

> Hi All,
> 
> I am trying to update mapping of an existing index "tweetindex" which has no data.
> 
> Initial mapping of "tweetindex "index is:
> 
> {  
> "tweet" : {  
> "\_source" : { "enabled" : false},  
> "properties" : {  
> "field1" : { "type" : "string", "index" : "not\_analyzed","store":"yes" },  
> "field2" : { "type" : "string", "index" : "analyzed","store":"yes" }  
> }  
> }  
> }
> 
> New mapping which i want is:
> 
> {  
> "tweet" : {  
> "\_source" : { "enabled" : false},  
> "properties" : {  
> "field1" : { "type" : "string", "index" : "no","store":"yes" },  
> "field2" : { "type" : "string", "index" : "analyzed","store":"yes" }  
> }  
> }  
> }
> 
> I want to update mapping of field1 from not\_analyzed to no But its throwing an exception:
> 
> {"error":"MergeMappingException[Merge failed with failures {[mapper [field1] has different index values, mapper [field1] has different tokenize values, mapper [field1] has different index\_analyzer]}]","status":400}
> 
> Any suggestion regarding this will be really helpful !!
> 
> ## -- Thanks & Regards Hanish Bansal
> 
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:23am UTC](https://discuss.elastic.co/t/update-mapping-of-index/13067/3 "2017-07-06T02:23:00Z")

</div>


