# Do I have to reindex v5 indices for an upgrade to v6?

**URL:** <https://discuss.elastic.co/t/do-i-have-to-reindex-v5-indices-for-an-upgrade-to-v6/152810>\
**Category:** Elasticsearch\
**Created:** [October 17, 2018, 11:03am UTC](https://discuss.elastic.co/t/do-i-have-to-reindex-v5-indices-for-an-upgrade-to-v6/152810 "2018-10-17T11:03:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![juiip](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@juiip](https://discuss.elastic.co/u/juiip)\
**Post date:** [October 17, 2018, 11:03am UTC](https://discuss.elastic.co/t/do-i-have-to-reindex-v5-indices-for-an-upgrade-to-v6/152810/1 "2018-10-17T11:03:50Z")

</div>

I'm wondering whether the reindexing step is actually necessary for my upgrade of Elasticsearch to v6.  
My indices are time-based, and after a few weeks get deleted, so if Elasticserach v6 can still read v5 indices it seems pointless to reindex them, and rather just move them into a v6 cluster. In the meantime, new indices will be created in v6 format with a single type, and v5 indices will gradually get phased out.  
Is this possible/recommended?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [October 17, 2018, 11:36am UTC](https://discuss.elastic.co/t/do-i-have-to-reindex-v5-indices-for-an-upgrade-to-v6/152810/2 "2018-10-17T11:36:00Z")

</div>

Yes, this is fine.  
You only _need_ to reindex if you have indices from the previous major (2.x in this case).  
If you _exclusively_ use time based indices, and delete indices past a certain age, then you can keep doing rolling upgrades for each major release.

But watch out for any separate, non-time-based indices you might have (`.kibana`, etc).

---

<div class="post-metadata">

**Author:** ![juiip](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@juiip](https://discuss.elastic.co/u/juiip)\
**Post date:** [October 22, 2018, 12:00pm UTC](https://discuss.elastic.co/t/do-i-have-to-reindex-v5-indices-for-an-upgrade-to-v6/152810/3 "2018-10-22T12:00:33Z")

</div>

Thanks for your response.  
Does Elasticsearch 6 allow you to upload documents into both v5 and v6 index formats?

---

<div class="post-metadata">

**Author:** ![Emanuil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emanuil/32/36783_2.png) [@Emanuil](https://discuss.elastic.co/u/Emanuil)\
**Post date:** [October 22, 2018, 1:01pm UTC](https://discuss.elastic.co/t/do-i-have-to-reindex-v5-indices-for-an-upgrade-to-v6/152810/4 "2018-10-22T13:01:12Z")

</div>

If you're using the HTTP API, then from your point of view you're always sending the same document into Elasticsearch. The way it's stored internally changes between different major versions. That's why you have to reindex going from 2.x to 6.x - it can't read its own "internal" files. But you would have sent the exact same JSON to a 2.x cluster as you would to a 6.x cluster.

---

<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 19, 2018, 1:01pm UTC](https://discuss.elastic.co/t/do-i-have-to-reindex-v5-indices-for-an-upgrade-to-v6/152810/5 "2018-11-19T13:01:15Z")

</div>

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