1
votes

I am trying to reindex from elasticsearch 1.0 to elasticsearch 5.0 directly by using reindex from remote option

Both the versions are installed in the remote system and running on port number 9200 and 9201 respectively.

I have followed the steps of indexing from remote. 1st I have created snapshot of the data in elasticsearch 1.0. The mapping for the data is created in elasticsearch 5.0 with a new index name. but whenever I try to post the json document using the curl command :

curl -XPOST "localhost:9201/_reindex" -d @reindex.json

{
  "source": {
    "remote": {
      "host": "localhost:9200",
     "index" : "customer"

    }

  },
  "dest": {
    "index": "new_customer"
  }
}

I am getting an error like this. reindex from remote error

Please help me resolve the issue

2
Like the error says, simply change localhost:9200 to http://localhost:9200Val

2 Answers

1
votes

Please copy & paste the error messages instead of creating a screenshot in the future.

Your screenshot shows, that Elasticsearch actually returns a useful error message: you did not specify a scheme for the hostname. A scheme in this example means you have to specify http or https as part of the hostname.

0
votes

Answering because i lack the reputation to comment.

Probably the following isn't the cause of your error but it'll help you once you get ahead of it. A snippet from ES documentation:

  1. A snapshot of an index created in 2.x can be restored to 5.x.
  2. A snapshot of an index created in 1.x can be restored to 2.x.
  3. A snapshot of an index created in 1.x can not be restored to 5.x.

To restore a snapshot of an index created in 1.x to 5.x you can restore it to a 2.x cluster and use reindex-from-remote to rebuild the index in a 5.x cluster.

Link to documentation