# How to update a filed type without deleting the index or data

**URL:** <https://discuss.elastic.co/t/how-to-update-a-filed-type-without-deleting-the-index-or-data/154417>\
**Category:** Elasticsearch\
**Created:** [October 29, 2018, 9:56am UTC](https://discuss.elastic.co/t/how-to-update-a-filed-type-without-deleting-the-index-or-data/154417 "2018-10-29T09:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit.patra](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@amit.patra](https://discuss.elastic.co/u/amit.patra)\
**Post date:** [October 29, 2018, 9:56am UTC](https://discuss.elastic.co/t/how-to-update-a-filed-type-without-deleting-the-index-or-data/154417/1 "2018-10-29T09:56:18Z")

</div>

HI,

i want to update a filed type without deleting the index or data.

How can we achieve that?

Thanks in advanced.

---

<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:** [October 29, 2018, 1:06pm UTC](https://discuss.elastic.co/t/how-to-update-a-filed-type-without-deleting-the-index-or-data/154417/2 "2018-10-29T13:06:11Z")

</div>

```auto
PUT foo/_doc/1
{
  "foo": "bar"
}
PUT foo/_doc/1
{
  "foo": "baz"
}
```

---

<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 29, 2018, 2:16pm UTC](https://discuss.elastic.co/t/how-to-update-a-filed-type-without-deleting-the-index-or-data/154417/3 "2018-10-29T14:16:31Z")

</div>

Are you talking about updating the mapping type of a field in an index? If so, that is unfortunately not possible and will require you to reindex your data into a new index.

---

<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 26, 2018, 2:16pm UTC](https://discuss.elastic.co/t/how-to-update-a-filed-type-without-deleting-the-index-or-data/154417/4 "2018-11-26T14:16:34Z")

</div>

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