elasticsearch reindex error - 来自远程的reindex

时间:2017-06-22 04:30:51

标签: elasticsearch remote-access reindex

我正在尝试使用来自远程选项

的reindex直接从elasticsearch 1.0重新索引到elasticsearch 5.0

这两个版本都安装在远程系统中,分别在端口号9200和9201上运行。

我已经按照远程索引的步骤进行了操作。首先,我在elasticsearch 1.0中创建了数据快照。数据的映射在elasticsearch 5.0中使用新的索引名称创建。但每当我尝试使用curl命令发布json文档时:

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

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

    }

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

我收到这样的错误。 reindex from remote error

请帮我解决问题

2 个答案:

答案 0 :(得分:1)

请复制&粘贴错误消息,而不是将来创建屏幕截图。

您的屏幕截图显示,Elasticsearch实际上返回了一条有用的错误消息:您没有为主机名指定方案。此示例中的方案意味着您必须指定httphttps作为主机名的一部分。

答案 1 :(得分:0)

回答是因为我缺乏评论的声誉。

以下情况可能不是您错误的原因,但是一旦您领先它,它会帮助您。 来自ES文档的片段:

  
      
  1. 2.x中创建的索引的快照可以恢复为5.x。
  2.   
  3. 在1.x中创建的索引的快照可以恢复为2.x。
  4.   
  5. 在1.x中创建的索引的快照无法恢复为5.x。
  6.         

    要将在1.x中创建的索引的快照还原到5.x,您可以将其还原到2.x群集,并使用reindex-from-remote在5.x群集中重建索引。

Link to documentation