索引的打開與關閉
關閉索引
POST /index_name/_close
嘗試插入數據
PUT /shakespeare/_doc/1 { "title":"kibana" }
此時會報以下錯誤
{ "error": { "root_cause": [ { "type": "index_closed_exception", "reason": "closed", "index_uuid": "vpyc3jt9TbGYFm96KUPlfw", "index": "shakespeare" } ], "type": "index_closed_exception", "reason": "closed", "index_uuid": "vpyc3jt9TbGYFm96KUPlfw", "index": "shakespeare" }, "status": 400 }
重新打開索引
POST /index_name/_open
返回結果
{ "acknowledged": true, "shards_acknowledged": true }
以上便是索引的打開與關閉!