I have _index: varnish_logs and _type: varnish
field with two different meanings: "server": "india" and "server": "usa"
Now I want to delete only entries that are in usa.
I tried to use
$ curl -XDELETE ' http: // localhost: 9200 / _all / _query? q = server: usa '
response: handler not found for uri [] and method [DELETE]
and also tried to delete all the data using the query
curl -XDELETE 'http://localhost:9200/varnish_logs/varnish/_query' -d '
{ "query" :{ "match_all" : {} }
}'
all get an answer: found: "false"

Please let me know where I am wrong
source
share