# Elasticsearch 2.1 \_uid is reformated, shard will failed

**URL:** <https://discuss.elastic.co/t/elasticsearch-2-1--uid-is-reformated-shard-will-failed/40324>\
**Category:** Elasticsearch\
**Created:** [January 28, 2016, 6:45am UTC](https://discuss.elastic.co/t/elasticsearch-2-1--uid-is-reformated-shard-will-failed/40324 "2016-01-28T06:45:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![whybangbang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whybangbang/32/7116_2.png) [@whybangbang](https://discuss.elastic.co/u/whybangbang)\
**Post date:** [January 28, 2016, 6:45am UTC](https://discuss.elastic.co/t/elasticsearch-2-1--uid-is-reformated-shard-will-failed/40324/1 "2016-01-28T06:45:41Z")

</div>

> [@Logstash 2.1: Dynamically Altering Field Names](https://discuss.elastic.co/t/logstash-2-1-dynamically-altering-field-names/36845):
>
> Hi, I've seen an issue in recent days with sending data to elasticsearch 2.1 where inbound messages contained an "\_uid" field which clashed with the type of the in-built meta-field "\_uid". This led to indexing failing, shards becoming unassigned and the cluster going into a red state. Given elasticsearch's apparent heightened sensitivity around type handling I feel I need to strip any leading underscores from inbound field names as a safety measure. However, as our log formats vary widely we …

this form maybe met the same problem:  
received shard failed for [api-nginx-logs-2016.01.27][0], node[qIW6bRNhRH-f6c4d4mL0\_g], [R], v[5], s[STARTED], a[id=LLmaqrfqRTSJeHVoBGGUKg], indexUUID [PkwVMa-pR96vk30tXQZChA], message [failed to update mappings], failure [IllegalArgumentException[Mapper for [\_uid] conflicts with existing mapping in other types:  
[mapper [\_uid] cannot be changed from type [\_uid] to [string]]]]  
if is a bug in 2.1?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 29, 2016, 8:05am UTC](https://discuss.elastic.co/t/elasticsearch-2-1--uid-is-reformated-shard-will-failed/40324/2 "2016-01-29T08:05:47Z")

</div>

It's not a bug, it's ES stopping you from having bad mappings.

Can you provide more information, what does the data look like?

---

<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:20pm UTC](https://discuss.elastic.co/t/elasticsearch-2-1--uid-is-reformated-shard-will-failed/40324/3 "2017-07-05T23:20:28Z")

</div>


