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

**URL:** <https://discuss.elastic.co/t/field-location-is-defined-as-a-field-in-mapping-places-but-this-name-is-already-used-for-an-object-in-other-types/68038>\
**Category:** Elasticsearch\
**Created:** [December 5, 2016, 12:06pm UTC](https://discuss.elastic.co/t/field-location-is-defined-as-a-field-in-mapping-places-but-this-name-is-already-used-for-an-object-in-other-types/68038 "2016-12-05T12:06:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![minniek](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@minniek](https://discuss.elastic.co/u/minniek)\
**Post date:** [December 5, 2016, 12:06pm UTC](https://discuss.elastic.co/t/field-location-is-defined-as-a-field-in-mapping-places-but-this-name-is-already-used-for-an-object-in-other-types/68038/1 "2016-12-05T12:06:12Z")

</div>

Hello ,  
I am getting this error : Field [location] is defined as a field in mapping [places] but this name is  
already used for an object in other types.

and I dont know what is going on. I only have one location field with type equal to geo\_point.  
Any ideas=

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 5, 2016, 12:35pm UTC](https://discuss.elastic.co/t/field-location-is-defined-as-a-field-in-mapping-places-but-this-name-is-already-used-for-an-object-in-other-types/68038/2 "2016-12-05T12:35:32Z")

</div>

Hey,

this message explains that you have a field called `location` in another **type** in your index already set. Is it possible that you are querying more than one **type**?

--Alex

---

<div class="post-metadata">

**Author:** ![minniek](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@minniek](https://discuss.elastic.co/u/minniek)\
**Post date:** [December 5, 2016, 1:06pm UTC](https://discuss.elastic.co/t/field-location-is-defined-as-a-field-in-mapping-places-but-this-name-is-already-used-for-an-object-in-other-types/68038/3 "2016-12-05T13:06:57Z")

</div>

yes, I had five different types and one of them had a different mapping field. In my opinon I should had got an error in the type with wrong mapping field but I got in other (weird).  
Anyways, I did a backup, modified the mapping and restored the data.  
Thanks

---

<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:** [January 2, 2017, 1:07pm UTC](https://discuss.elastic.co/t/field-location-is-defined-as-a-field-in-mapping-places-but-this-name-is-already-used-for-an-object-in-other-types/68038/4 "2017-01-02T13:07:22Z")

</div>

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