Is there any way to know which Elasticsearch version a particular index was created in?
This is mainly useful when you want to upgrade your cluster and there might be older indices which need to be reindexed to a newer version prior to upgrade the cluster to avoid incompatibility issues.
For example, if we want to upgrade to version 7.5, if we have indices created in 5.x or before, we need to reindex or delete them before upgrading to 7.5.0. Elasticsearch nodes will fail to start if incompatible indices are present. Snapshots of 5.x or earlier indices cannot be restored to a 7.x cluster even if they were created by a 6.x cluster (https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade.html).