# \[x\] is defined as an object in mapping \[y\] but this name is already used for a field in other types

**URL:** <https://discuss.elastic.co/t/x-is-defined-as-an-object-in-mapping-y-but-this-name-is-already-used-for-a-field-in-other-types/204993>\
**Category:** Elasticsearch\
**Created:** [October 24, 2019, 3:52am UTC](https://discuss.elastic.co/t/x-is-defined-as-an-object-in-mapping-y-but-this-name-is-already-used-for-a-field-in-other-types/204993 "2019-10-24T03:52:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![idanruf1](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@idanruf1](https://discuss.elastic.co/u/idanruf1)\
**Post date:** [October 24, 2019, 3:52am UTC](https://discuss.elastic.co/t/x-is-defined-as-an-object-in-mapping-y-but-this-name-is-already-used-for-a-field-in-other-types/204993/1 "2019-10-24T03:52:52Z")

</div>

I get this error when I try to index a document, and I have no idea what it means and how to solve it. I have a mapping without duplicate fields and a document matching the mapping.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 24, 2019, 5:10am UTC](https://discuss.elastic.co/t/x-is-defined-as-an-object-in-mapping-y-but-this-name-is-already-used-for-a-field-in-other-types/204993/2 "2019-10-24T05:10:57Z")

</div>

It means that you have a mapping conflict. If you can show us the template and the full error we may be able to identify the error.

---

<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:** [November 21, 2019, 5:10am UTC](https://discuss.elastic.co/t/x-is-defined-as-an-object-in-mapping-y-but-this-name-is-already-used-for-a-field-in-other-types/204993/3 "2019-11-21T05:10:57Z")

</div>

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