复制索引
先决条件
PUT http://127.0.0.1:9200/posts/_settings
Content-Type: application/json
{
"settings": {
"index.blocks.write": true
}
}
克隆完成之后,别忘记把只读改成可读,上面这段代码把index.blocks.write设置为false,在索引posts,post1上执行。
克隆索引
POST http://127.0.0.1:9200/posts/_clone/post1