ElasticSearch 清空index数据的方法 _delete_by_query

curl工具命令:

查询删除:
curl -u用户名:密码 -XPOST '192.168.0.201:9200/quality_control/my_type/_delete_by_query?refresh&slices=5&pretty' -H 'Content-Type: application/json' 
-d'{
  "query": {
    "match_all": {}
  }
}'

kibana:

#清空索引
POST quality_control/my_type/_delete_by_query?refresh&slices=5&pretty
{
  "query": {
    "match_all": {}
  }
}

此操作会分成5个切片去执行删除

执行后返回每个切片删除的信息。


你可能感兴趣的:(elasticsearch)