When moving to Elasticsearch 8.7 (latest as of writing) from such an old version you basically have 2 options as a lot has changed in the several major versions in between.
Set everything (templates, mappings etc) up in a new Elasticsearch 8.7 cluster and run a reindex from remote. You can probably also use elasticdump if you prefer this. Note that you most likely also will need to upgrade client libraries at the same time so this will all require downtime.
You can also migrate in place, although this gets complicated with so many jumps as Elasticsearch only supports one major version upgrade at a time after which data will need to be reindexed. This would therefore require quite a few steps (5.4 -> 6.8 -> (run migration assistant) -> (reindex) -> 7.17 -> (run migration assistant) -> (reindex) -> 8.7) and can be time consuming. In this scenario client libraries will also need to be upgraded/changed.
Thanks for suggesting the options. Let me follow the option2 because mostly to upgrade the ES version I have been using that way only. If i encounter any issue then again i will take your side advice.
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.