I'm trying to upgrade elasticsearch from 2.4.4 to 6.2.2.
According to https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade.html,
"To upgrade an Elasticsearch cluster running 2.x, you have two options:
Perform a full cluster restart upgrade to 5.6, reindex the 2.x indices, then perform a rolling upgrade to 6.x. If your Elasticsearch 2.x cluster contains indices that were created before 2.x, you must either delete or reindex them before upgrading to 5.6. For more information about upgrading from 2.x to 5.6, see Upgrading Elasticsearch in the Elasticsearch 5.6 Reference.
Create a new 6.x cluster and reindex from remote to import indices directly from the 2.x cluster.
I've tried the second option - to reindex from remote: I have created in ES 6.2.2 all needed indexes with all settings and mappings from the old indexes, but when I try to POST /_reindex, I get JSON that shows nothing were updated or created. Corresponding indexes in ES 6.2.2 are still empty so it means nothing were transfered to a new version.
Also I've tried to use the first option. The general steps are:
1 - Disable shard reallocation
2 - Shutdown the node
3 - Install new ES version
4 - Enable shard reallocation
5 - Wait for node to connect to the cluster
But the questions are:
Step 2 - How exactly should I shutdown the node? Should I stop the container with ES v.2.4.4?
Step 3 - How can I do it with the containers? Should I just run another one container with the new version or what?
Could you please help me with the understanding how to perform this upgrade the most easy and correct way in case of using Docker containers?