Mapping conflict

Im having this error:

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.

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, to copy your data to the new index.

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.

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?

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.