復制索引
先決條件
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