背景
测试经常使用reindex API,一般都是同版本或者升级版本使用;
使用
remote reindex
POST _reindex
{
"conflicts": "proceed",
"source": {
"remote": {
"host": "http://xxx.com:80",
"username": "elastic",
"password": "xxxxx",
"headers": {
"x-client-app": "12345"
}
},
"index": "test",
"size": 1000,
"query": {
"match_all": {}
}
},
"dest": {
"index": "test"
}
}
发现报错
{
"error": {
"root_cause": [
{
"type": "exception",
"reason": "Error parsing the response, remote is likely not an Elasticsearch instance"
}
],
"type": "exception",
"reason": "Error parsing the response, remote is likely not an Elasticsearch instance",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:242] [search_response] failed to parse field [hits]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:242] [hits] total doesn't support values of type: START_OBJECT"
}
}
},
"status": 500
}
原因:remote reindex无法从ES7同步数据到ES6(不能降级)