【发布时间】:2017-02-27 07:37:39
【问题描述】:
elasticsearch-reindex -f http://localhost:9200/artist -t http://localhost:9200/painter
得到错误为:
TypeError:无效的主机配置。需要一个 URL、一组 url、一个主机配置对象或一组主机配置对象。 工人退出错误代码:1 重新索引已成功完成。
【问题讨论】:
标签: elasticsearch
elasticsearch-reindex -f http://localhost:9200/artist -t http://localhost:9200/painter
得到错误为:
TypeError:无效的主机配置。需要一个 URL、一组 url、一个主机配置对象或一组主机配置对象。 工人退出错误代码:1 重新索引已成功完成。
【问题讨论】:
标签: elasticsearch
你真的需要一个插件来做到这一点吗?
curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
{
"source": {
"index": "artist"
},
"dest": {
"index": "painter"
}
}
'
这应该可以正常工作。更多选项和信息here。
【讨论】:
$ elasticsearch-reindex -f http://192.168.1.100:9200/old_index/old_type -t http://10.0.0.1:9200/new_index/new_type