【问题标题】:error while running the elasticsearch-reindexer from command prompt从命令提示符运行 elasticsearch-reindexer 时出错
【发布时间】:2017-02-27 07:37:39
【问题描述】:

elasticsearch-reindex -f http://localhost:9200/artist -t http://localhost:9200/painter

得到错误为:

TypeError:无效的主机配置。需要一个 URL、一组 url、一个主机配置对象或一组主机配置对象。 工人退出错误代码:1 重新索引已成功完成。

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    你真的需要一个插件来做到这一点吗?

    curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
    {
      "source": {
        "index": "artist"
      },
      "dest": {
        "index": "painter"
      }
    }
    '
    

    这应该可以正常工作。更多选项和信息here

    【讨论】:

    • 我不想通过 curl 来做。你能告诉我为什么我得到上述错误是一些语法错误吗?
    • 不知道,但这里的示例是除了索引之外还传递类型。 github.com/garbin/elasticsearch-reindex$ elasticsearch-reindex -f http://192.168.1.100:9200/old_index/old_type -t http://10.0.0.1:9200/new_index/new_type
    • 我添加了类型,错误消失了。但在 elasticHQ 中看不到对索引所做的更改。
    • 但是新索引是空的?是的,我真的不能说,我一直使用 curl 或 Javascript API。
    • 新命令 - elasticsearch-reindex -f localhost:9200/artist/artist -t localhost:9200/painter/artist。在控制台中开始重新索引 1 个分片。重新索引已成功完成。它工作正常。但是在 elasticHQ UI 中看不到对索引所做的更改。仍然索引名称是同一艺术家。
    猜你喜欢
    • 2011-06-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-24
    • 1970-01-01
    • 1970-01-01
    • 2015-10-21
    相关资源
    最近更新 更多