搜索结果正在快递途中

elasticsearch6.x 跨集群reindex的问题

Elasticsearch | 作者 code4j | 发布于2019年04月18日 | 阅读数:2911

今天做6.x跨集群reindex发现这么一个问题:
命令执行如下:


141555596253_.pic_.jpg

 
两个集群都是6.x的,返回结果如下:
 

151555596281_.pic_hd_.jpg

 
6版本对http请求都比较严格,会校验header的ContentType
curl中可以带这个header,但是从remote scroll数据的请求却没法设置,导致目前这个命令无法正常通过。
但是从2.x往6.x导数据是可以的,因为2版本不会校验header。
 
 
求大佬解答。
已邀请:

rochy - rochy_he

赞同来自:

curl -X POST "localhost:9200/_reindex" -H 'Content-Type: application/json' -d'
{
"source": {
"remote": {
"host": "http://otherhost:9200",
"username": "user",
"password": "pass"
},
"index": "source",
"query": {
"match": {
"test": "data"
}
}
},
"dest": {
"index": "dest"
}
}
'
 
上述是官方提供的 CURL 样例,你可以参照修改一下看看

要回复问题请先登录注册