# Is there a reason why using the index API like this does not convert data?

**URL:** <https://discuss.elastic.co/t/is-there-a-reason-why-using-the-index-api-like-this-does-not-convert-data/267990>\
**Category:** Elasticsearch\
**Created:** [March 22, 2021, 4:00pm UTC](https://discuss.elastic.co/t/is-there-a-reason-why-using-the-index-api-like-this-does-not-convert-data/267990 "2021-03-22T16:00:52Z")\
**Posts on this page:** 3\
**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 22, 2021, 4:00pm UTC](https://discuss.elastic.co/t/is-there-a-reason-why-using-the-index-api-like-this-does-not-convert-data/267990/1 "2021-03-22T16:00:52Z")

</div>

Hello

If I create a new index from scratch and make the mapping, it understands the data, so the data isnt the issue.

But if I do something like this:

```
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

```

It doesnt work

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 22, 2021, 8:29pm UTC](https://discuss.elastic.co/t/is-there-a-reason-why-using-the-index-api-like-this-does-not-convert-data/267990/2 "2021-03-22T20:29:04Z")

</div>

What does mean "it does not work"?

Any error message? Any chance we can reproduce?

---

<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 19, 2021, 8:29pm UTC](https://discuss.elastic.co/t/is-there-a-reason-why-using-the-index-api-like-this-does-not-convert-data/267990/3 "2021-04-19T20:29:26Z")

</div>

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