I want to delete all documents with a specified category
.
I can find 107 documents with:
POST /myb-all/access/_search?pretty
{
"query": { "match": { "category": "Hit" } }
}
Which returns:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 107,
"max_score": null,
"hits": [
{
...
But DELETE doesn't delete them:
DELETE /myb-all/access/_search?pretty
{
"query": { "match": { "category": "Hit" } }
}
It returns:
{
"found": false,
"_index": "myb-all",
"_type": "access",
"_id": "_search",
"_version": 1,
"result": "not_found",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
}
}