命令:
POST /_reindex
{
"source": {
"index": "xxxxxx原索引名字"
},
"dest": {
"index": "xxxxxx目标索引名字"
}
}
head插件操作:
curl命令:
curl -X POST "localhost:9200/_reindex?pretty" -H 'Content-Type: application/json' -d'
{
"source": {
"index": "twitter"
},
"dest": {
"index": "new_twitter"
}
}
'
查看进度:
GET _tasks?detailed=true&actions=*reindex
浏览器访问:
http://xxxip:9200/_tasks?detailed=true&actions=*reindex
显示出的total",“updated”,"created"可以看见进度
或者下面命令也可以查看:
curl -X GET "localhost:9200/_tasks?detailed=true&actions=*reindex&pretty"