I am trying to run upgrades on a dockerized ES environment.
With indices created in 7.17.9, I am able to successfuly migrate to 8.19.18, by just bringing up a new container of ES 8.19.18 pointing to the same volume mount containing the data, created by the 7.17.9.
But when migrating from ES to 8.19.18 to 9.4,3 using the same approach, as there are indices created with incompatible version[7.17.9] are existing, migration fails
We can mark those indices as read only, and block writing to the index, that let us migrate to 9.4.3.
But the problem is, after thje migration, with 9.4.3, those indices cannot be made writeable, because of the incompatibility issue.
Using reindexing is not an option for us, because of the following reasons
We do not want the index names changed
The index mappings has source enabled set to false
So,
Could some one advise us what is the right approach here ?
Is there any way, I can mark these indices writeable again ?
Is there any alternate option available ? We may have many indices and with large amount of data in them. Marking them as read only is not a viable solution for us. Because, many of the documents may need further updates, even after the migration. And we cannot have the same document saved in two different indices as well.
Unfortunately I do not think you have many options here.
An index created on version 7 will not be writeable in version 9, to solve this you would need to reindex the data, but at the same time you cannot reindex the data because you have _source disabled.
To reindex the data in an alternative way you would need to export your data using some query and then index this in a different new index on version 8.19, once you have the index in version 8.19 you would be able to upgrade to version 9.
Depending on the size of your indices, this would require a lot of work, time and disk space.
If you really want to use the same index name, you could index the exported data in a temporary index (with _source enabled) and after that delete the old index and reindex again in a new index with the old name.
Being honest, without more context on how you use Elasticsearch, I think it would be way more easier to deprecate the old index and start writing into a new one.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.