# Data from 2.4.1 to 5.12 ,the data type is not changed?

**URL:** <https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788>\
**Category:** Elasticsearch\
**Created:** [March 31, 2017, 9:08am UTC](https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788 "2017-03-31T09:08:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wenthywang](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@wenthywang](https://discuss.elastic.co/u/wenthywang)\
**Post date:** [March 31, 2017, 9:08am UTC](https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788/1 "2017-03-31T09:08:15Z")

</div>

![](https://us1.discourse-cdn.com/elastic/original/3X/1/8/188cf467d18280d484b726e4803a586b27184b6c.png)  
current es is 5.1.2,but i see the dataType from 2.4.1 is not changed?  
how i can do to solve it?  
or it is not important to solve? i dont care about it ?

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [March 31, 2017, 9:28am UTC](https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788/2 "2017-03-31T09:28:25Z")

</div>

Hi,

quoting from the docs on the [String datatype](https://www.elastic.co/guide/en/elasticsearch/reference/current/string.html) in 5.3:

> Indexes imported from 2.x only support string and not text or keyword. To ease the migration from 2.x Elasticsearch will downgrade text and keyword mappings applied to indexes imported from 2.x into string. While long lived indexes will eventually need to be recreated against 5.x before eventually upgrading to 6.x, this downgrading smooths the process before you find time for it.

Also see the [blog post](https://www.elastic.co/blog/strings-are-dead-long-live-strings) on Text vs. keyword for further explanation.

To me this seems to say that you are okay with leaving the type as is for now, but you will need to reindex your data (recreate the whole index with a new mapping) before upgrading to future 6.x versions.

---

<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 31, 2017, 9:30am UTC](https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788/3 "2017-03-31T09:30:35Z")

</div>

Please don't post images but formatted text with `</>` instead. Thanks.

---

<div class="post-metadata">

**Author:** ![wenthywang](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@wenthywang](https://discuss.elastic.co/u/wenthywang)\
**Post date:** [March 31, 2017, 9:45am UTC](https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788/4 "2017-03-31T09:45:45Z")

</div>

but the comment area have the way to upload image.  
i think the image is more than text...

---

<div class="post-metadata">

**Author:** ![wenthywang](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@wenthywang](https://discuss.elastic.co/u/wenthywang)\
**Post date:** [March 31, 2017, 9:55am UTC](https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788/5 "2017-03-31T09:55:37Z")

</div>

oh.i see it. that means i should recreate the whole index with a new mapping before i upgrade es.  
but my old data(old version-2.x) is over time?dont recovery?  
if i recreate ,how can i recovery the data from old version?😭

---

<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 28, 2017, 9:55am UTC](https://discuss.elastic.co/t/data-from-2-4-1-to-5-12-the-data-type-is-not-changed/80788/6 "2017-04-28T09:55:50Z")

</div>

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