i trying delete part of data in elasticsearch index using curl
. trying delete based on timestamp query(like purge data time). have tried below query deleting complete data in index.
curl -xdelete 'http://beepal1.tms.toyota.com:9200/logstash-sys_timestamp' -d ' { "query": { "range": { "@timestamp": { "gte": "2016-05-27t07:00:00.000z", "lte": "2016-05-28t06:59:59.999z" } } } }'
i don't know going wrong.
thanks in advance
you need install delete query plugin first , can run this:
curl -xdelete 'http://beepal1.tms.toyota.com:9200/logstash-sys_timestamp/_query' -d ' { "query": { "range": { "@timestamp": { "gte": "2016-05-27t07:00:00.000z", "lte": "2016-05-28t06:59:59.999z" } } } }'