Elasticsearch之index_closed_exception


索引的打開與關閉


關閉索引

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
}

以上便是索引的打開與關閉!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM