# Error on adding the new field mapping in already existing mapping

**URL:** <https://discuss.elastic.co/t/error-on-adding-the-new-field-mapping-in-already-existing-mapping/19734>\
**Category:** Elasticsearch\
**Created:** [September 11, 2014, 10:05am UTC](https://discuss.elastic.co/t/error-on-adding-the-new-field-mapping-in-already-existing-mapping/19734 "2014-09-11T10:05:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![narinder\_izap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/narinder_izap/32/803_2.png) [@narinder\_izap](https://discuss.elastic.co/u/narinder_izap)\
**Post date:** [September 11, 2014, 10:05am UTC](https://discuss.elastic.co/t/error-on-adding-the-new-field-mapping-in-already-existing-mapping/19734/1 "2014-09-11T10:05:28Z")

</div>

Hi,

```
       We already have a type in our system, *YsFact*. Now I needed to 

```

add a new field in this type, _username_. And username has following  
mapping.

_"username":{"type":"string","index":"not\_analyzed"}_

We have a script in the system, that executes the mappings automatically.  
and in the execution of mapping, I am getting the following errors.

YsFact :: MergeMappingException[Merge failed with failures {[mapper  
[username] has different index values, mapper [username] has different  
`norms.enabled` values, mapper [username] has different tokenize values,  
mapper [username] has different index\_analyzer]}]

Although, We have not added anything against username in the YsFact type.  
So I do not think so that Elasticsearch should have created some default  
mappings on it as no data indexed against this field. This was the response  
for the first time,we introduced this field in mappings.

One thing, I want to notify is that, we have username fields in other types  
which has data against the username. Can it conflict the YsFact ??  
Also Our Production Elasticsearch server consists of 3 nodes and 2  
replicas. Can something related to distribution there ?

Does anyone have any idea what happend over here?

Thanks in advance for all kind of details on it.

--  
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/7f5d6215-6388-489d-9810-9cc2fc0972f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f5d6215-6388-489d-9810-9cc2fc0972f9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [September 11, 2014, 1:35pm UTC](https://discuss.elastic.co/t/error-on-adding-the-new-field-mapping-in-already-existing-mapping/19734/2 "2014-09-11T13:35:04Z")

</div>

Probably at some point you did send something to elasticsearch which created the username field.

Try to get the actual mapping for your YsFact type using:

GET /index/YsFact/\_mapping

And you should see the existing definition.  
May be you are using templates?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 11 septembre 2014 à 12:05:33, Narinder Kaur (narinder.kaur@izap.in) a écrit:

Hi,

```
       We already have a type in our system, YsFact. Now I needed to add a new field in this type, username. And username has following mapping.

```

"username":{"type":"string","index":"not\_analyzed"}

We have a script in the system, that executes the mappings automatically. and in the execution of mapping, I am getting the following errors.

YsFact :: MergeMappingException[Merge failed with failures {[mapper [username] has different index values, mapper [username] has different `norms.enabled` values, mapper [username] has different tokenize values, mapper [username] has different index\_analyzer]}]

Although, We have not added anything against username in the YsFact type. So I do not think so that Elasticsearch should have created some default mappings on it as no data indexed against this field. This was the response for the first time,we introduced this field in mappings.

One thing, I want to notify is that, we have username fields in other types which has data against the username. Can it conflict the YsFact ??  
Also Our Production Elasticsearch server consists of 3 nodes and 2 replicas. Can something related to distribution there ?

Does anyone have any idea what happend over here?

Thanks in advance for all kind of details on it.

--  
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/7f5d6215-6388-489d-9810-9cc2fc0972f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f5d6215-6388-489d-9810-9cc2fc0972f9%40googlegroups.com).  
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/etPan.5411a508.1190cde7.3c6%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5411a508.1190cde7.3c6%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![narinder\_izap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/narinder_izap/32/803_2.png) [@narinder\_izap](https://discuss.elastic.co/u/narinder_izap)\
**Post date:** [September 17, 2014, 9:43am UTC](https://discuss.elastic.co/t/error-on-adding-the-new-field-mapping-in-already-existing-mapping/19734/3 "2014-09-17T09:43:15Z")

</div>

Thanks for the reply.

Yes, You were right, the mapping was there.

On Thursday, 11 September 2014 15:35:29 UTC+5:30, Narinder Kaur wrote:

> Hi,
> 
> ```
> We already have a type in our system, *YsFact*. Now I needed 
> 
> ```
> 
> to add a new field in this type, _username_. And username has following  
> mapping.
> 
> _"username":{"type":"string","index":"not\_analyzed"}_
> 
> We have a script in the system, that executes the mappings automatically.  
> and in the execution of mapping, I am getting the following errors.
> 
> YsFact :: MergeMappingException[Merge failed with failures {[mapper  
> [username] has different index values, mapper [username] has different  
> `norms.enabled` values, mapper [username] has different tokenize values,  
> mapper [username] has different index\_analyzer]}]
> 
> Although, We have not added anything against username in the YsFact type.  
> So I do not think so that Elasticsearch should have created some default  
> mappings on it as no data indexed against this field. This was the response  
> for the first time,we introduced this field in mappings.
> 
> One thing, I want to notify is that, we have username fields in other  
> types which has data against the username. Can it conflict the YsFact ??  
> Also Our Production Elasticsearch server consists of 3 nodes and 2  
> replicas. Can something related to distribution there ?
> 
> Does anyone have any idea what happend over here?
> 
> Thanks in advance for all kind of details on it.

--  
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/99f4a761-9d77-468e-9b29-6a43cf90d778%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/99f4a761-9d77-468e-9b29-6a43cf90d778%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, 1:01am UTC](https://discuss.elastic.co/t/error-on-adding-the-new-field-mapping-in-already-existing-mapping/19734/4 "2017-07-06T01:01:40Z")

</div>


