重点
reindex
不会复制新建/目标索引,所以在执行操作前,需要自己主动创建目标索引
reindex
要求所有索引enabled
reindex
# verstion_type: external, internal
POST _reindex
{
"conflicts": "proceed",
"source": {
"index": "twitter",
"query": {
"term": {
"user": "kimchy"
}
}
},
"dest": {
"index": "new_twitter",
"op_type": "create",
"version_type": "internal"
}
}
POST _reindex
{
"source": {
"index": ["twitter", "blog"]
},
"dest": {
"index": "all_together"
}
}
POST _reindex
{
"size": 10000,
"source": {
"index": "twitter",
"_source": ["user", "_doc"],
"sort": { "date":