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

just like v 2.x -> v 5.x or v 5.x -> v 5.y (y>x) will old indexes still work ?

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

The migration plugin can tell you more BTW.

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 ?

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).

3 Likes

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