Data movement between indexes in elasticsearch

We are looking to move data from one index to another index in the same server with changed mapping template...

We have tried the below link after creating alias in the index and reassign the alias

But the data is not getting transfered after using the below

curl -XPOST localhost:9200/_aliases -d '
"actions": [
{ "remove": {
"alias": "my_index",
"index": "my_index_v1"
{ "add": {
"alias": "my_index",
"index": "my_index_v2"


Hello Gayathri,

The aliases api is just a way of adding/removing different names for the same index, it won't do anything with your data. The blog post you mentioned requires that you reindex the data yourself.

If you want elasticsearch to reindex and you are using v2.3, then you may try the new Reindex API



I am using elasticsearch version 1.5.2... i want to change the mapping of an existing index. How is this possible?


i tried "_reindex" but getting below errors:

nested: InvalidIndexNameException[[_index] Invalid index name [index], must not start with '']; ","status":400}

i tried the below command:

curl -XPOST 'localhost:9201/_index' -d '{"source":{ "index":"old_index"},"dest":{"index":"new_index"}}'

The reindex API is not available in Elasticsearch 1.5.2, which is why you are getting the error. You should however be able to use Logstash to reindex as per Mark's example configuration.

OK Thanks