# If I upgrade my es cluster, will old indexes still work?

**URL:** https://discuss.elastic.co/t/if-i-upgrade-my-es-cluster-will-old-indexes-still-work/100304
**Category:** Elasticsearch
**Created:** [September 13, 2017, 7:56am UTC](https://discuss.elastic.co/t/if-i-upgrade-my-es-cluster-will-old-indexes-still-work/100304 "2017-09-13T07:56:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shijiebei2009](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shijiebei2009/32/22000_2.png) [@shijiebei2009](https://discuss.elastic.co/u/shijiebei2009)
#### Post date: [September 13, 2017, 7:56am UTC](https://discuss.elastic.co/t/if-i-upgrade-my-es-cluster-will-old-indexes-still-work/100304/1 "2017-09-13T07:56:47Z")

</div>

just like v 2.x -\> v 5.x or v 5.x -\> v 5.y (y\>x) will old indexes still 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: [September 13, 2017, 8:09am UTC](https://discuss.elastic.co/t/if-i-upgrade-my-es-cluster-will-old-indexes-still-work/100304/2 "2017-09-13T08:09:55Z")

</div>

Yes is your v2 indices have been created with a V2 version (not V1).

The migration plugin can tell you more BTW.

---

<div class="post-metadata">

### Author: ![shijiebei2009](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shijiebei2009/32/22000_2.png) [@shijiebei2009](https://discuss.elastic.co/u/shijiebei2009)
#### Post date: [September 13, 2017, 8:13am UTC](https://discuss.elastic.co/t/if-i-upgrade-my-es-cluster-will-old-indexes-still-work/100304/3 "2017-09-13T08:13:26Z")

</div>

> [@dadoonet](#):
>
> not V1).

yes the old indexes were created by v2.  
But I have a question, when I upgrade lucene version, the old indexes will not work, why are es cluster's old indexes still valid ?

---

<div class="post-metadata">

### Author: ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)
#### Post date: [September 13, 2017, 8:58am UTC](https://discuss.elastic.co/t/if-i-upgrade-my-es-cluster-will-old-indexes-still-work/100304/4 "2017-09-13T08:58:44Z")

</div>

Lucene supports reading indexes with segments created with the last major version (so Lucene 7.0.0 will read segments created with Lucene 6.y.z but not Lucene 5.y.z). Elasticsearch closely tracks Lucene versions and each major version of Elasticsearch has upgraded to a new major version of Lucene (so far at least). Therefore Elasticsearch assumes the same policy as Lucene, if you upgrade from Elasticsearch 2.x.y to Elasticsearch 5.x.y your indices will still be readable providing that all segments in all your indices were created using Elasticsearch 2. If you then immediately upgraded to Elasticsearch 6.0 (when its released), your indices will not be able to be read by Elasticsearch 6.0 since there will be segments in your indices which were written with a version more than a major version ago. In this case you would need to re-index those indices before you upgrade to 6.0 ([https://www.elastic.co/guide/en/elasticsearch/reference/5.6/reindex-upgrade.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/reindex-upgrade.html)).

---

<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: [October 11, 2017, 8:59am UTC](https://discuss.elastic.co/t/if-i-upgrade-my-es-cluster-will-old-indexes-still-work/100304/5 "2017-10-11T08:59:07Z")

</div>

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