1. 程式人生 > >利用es-head 刪除指定查詢條件中的資料

利用es-head 刪除指定查詢條件中的資料

在head中的複合查詢中選擇DELETE 引數用_query

例如刪除type 為gz_xx某個特定時間內的資料

http://xxx.xx.xxx.xx:9200/yuyinsearch-2016.01/gz_xx/

引數為_query

請求體為:

{
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "@timestamp": {
              "from": "2016-01-22T16:00:00.000Z",
              "to": "2016-01-23T15:59:58.000Z"
            }
          }
        }
      ]
    }
  }
}