【Elasticsearch】清空指定index/type下的數據


1.postman請求接口

http://ip:端口/index/type/_delete_by_query?conflicts=proceed

body為:

{
    "query": {
        "match_all": {}
    }
}

 

 

 注意,請求是POST方式。

2.curl

curl -u用戶名:密碼 -XPOST 'ip:9200/index_name/type_name/_delete_by_query?refresh&slices=5&pretty' -H 'Content-Type: application/json' 
-d'{
  "query": {
    "match_all": {}
  }
}'

3.Kibana

POST index_name/type_name/_delete_by_query
{
  "query": {"match_all": {}}
}


免責聲明!

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



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