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