Delete by query is not deleting documents from an Index


(Vikas Gopal) #1

Hi Experts,

I did following in ES 1.7.1

DELETE /prod-2016-03-09/AA/_query?pretty
{
  "query": { "match": { "alertmsg": "monitor" } }
}

after this I am also getting
{
"_indices": {
"prod-2016-03-09": {
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
}
}
}
}

Before deleting my index doc count is 7089 and after delete command it is still 7089. Even I fire refresh API but still count is same . Can anyone suggest what I am doing wrong .

Thanks
VG


What is the best way to delete document from a massive index?
(Mark Walkom) #2

Do you have documents that match the query?


(Vikas Gopal) #3

my bad I did not have the exact match which causes the issue . But is it recommended to use delete by query in a big index ? My index size is 1.5 TB.


(Mark Walkom) #4

You don't really have many other options!


(system) #5