【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": {}}
}
posted @ 2019-10-18 16:16    阅读(1356)  评论(0编辑  收藏  举报