# Mapping conflict

**URL:** <https://discuss.elastic.co/t/mapping-conflict/268088>\
**Category:** Elasticsearch\
**Created:** [March 23, 2021, 11:52am UTC](https://discuss.elastic.co/t/mapping-conflict/268088 "2021-03-23T11:52:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![riahc3](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@riahc3](https://discuss.elastic.co/u/riahc3)\
**Post date:** [March 23, 2021, 11:52am UTC](https://discuss.elastic.co/t/mapping-conflict/268088/1 "2021-03-23T11:52:01Z")

</div>

Im having this error:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/a/0aceab7b8f7395fc76457e7f3b08c7e0fb9e61a3.png)

And Im not sure how to fully fix this issue. Ive been able to specify it when I create the mapping for a future index but it doesnt seem to work this time around.

---

<div class="post-metadata">

**Author:** ![Vadims\_Daleckis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vadims_daleckis/32/57613_2.png) [@Vadims\_Daleckis](https://discuss.elastic.co/u/Vadims_Daleckis)\
**Post date:** [March 23, 2021, 12:33pm UTC](https://discuss.elastic.co/t/mapping-conflict/268088/2 "2021-03-23T12:33:52Z")

</div>

Hi @riahc3 ,

To re-index your data you would need to create a new index with the field mappings set to the correct types and then use the Reindex API, which documentation you can find [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html), to copy your data to the new index.

---

<div class="post-metadata">

**Author:** ![riahc3](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@riahc3](https://discuss.elastic.co/u/riahc3)\
**Post date:** [March 23, 2021, 2:03pm UTC](https://discuss.elastic.co/t/mapping-conflict/268088/3 "2021-03-23T14:03:33Z")

</div>

Hello @Vadims_Daleckis

I actually tried this but could never get it to work: It copies the index but doesnt set the mappings right:

```
POST _reindex
{
  "source": {
    "index": "myindex-2021.03.21"
  },
  "dest": {
    "index": "myindex-2021.03.21-temp"
  }
}

DELETE /myindex-2021.03.21

PUT /myindex-2021.03.21
{
  "mappings": {
    "properties": {
      "geoip": {
        "properties": {
          "location": { "type": "geo_point" }
        }
      }
    }
  }
}

POST _reindex
{
  "source": {
    "index": "myindex-2021.03.21-temp"
  },
  "dest": {
    "index": "myindex-2021.03.21"
  }
}

DELETE /myindex-2021.03.21-temp

```

I dont know though if this belongs in a entire different discussion.

---

<div class="post-metadata">

**Author:** ![Vadims\_Daleckis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vadims_daleckis/32/57613_2.png) [@Vadims\_Daleckis](https://discuss.elastic.co/u/Vadims_Daleckis)\
**Post date:** [March 23, 2021, 2:22pm UTC](https://discuss.elastic.co/t/mapping-conflict/268088/4 "2021-03-23T14:22:50Z")

</div>

I've added "Elasticsearch" tag, hopefully some Elasticsearch people can help with this.

When you say it "does not set the mappings right", do you mean you want the `location` field to be of `geo_point` type and it sets it to something else?

---

<div class="post-metadata">

**Author:** ![riahc3](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@riahc3](https://discuss.elastic.co/u/riahc3)\
**Post date:** [March 23, 2021, 2:58pm UTC](https://discuss.elastic.co/t/mapping-conflict/268088/5 "2021-03-23T14:58:20Z")

</div>

It doesnt really set it to something else. It says the same (a number)

I apoligize for not explaining things correctly as maybe Im missing something or not using the correctly termology.

---

<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:** [April 20, 2021, 2:58pm UTC](https://discuss.elastic.co/t/mapping-conflict/268088/6 "2021-04-20T14:58:23Z")

</div>

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