Elasticsearch 2.1: how to remove on demand using curl

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]

enter image description here 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"  enter image description here

Please let me know where I am wrong

+4
source share
1 answer

Elasticsearch . . , elasticsearch .

elasticsearch .

+8

Source: https://habr.com/ru/post/1619236/


All Articles