I tried to delete the 2000 docs of particular index. It got deleted but when i try to list then i am able to see the docs count unchanged..
root@kishan> curl -XPOST 'localhost:9200/cscfcounter/cscfcounter/_delete_by_query?routing=1&pretty' -H 'Content-Type: application/json' -d'
{
"size" : 2000,
"sort" : [
{ "date" : {"order" : "asc"}}
]
}'
{
"took" : 61,
"timed_out" : false,
"total" : 3,
"deleted" : 3,
"batches" : 1,
"version_conflicts" : 0,
"noops" : 0,
"retries" : {
"bulk" : 0,
"search" : 0
},
"throttled_millis" : 0,
"requests_per_second" : -1.0,
"throttled_until_millis" : 0,
"failures" : [ ]
}
root@kishan> curl -XGET 'localhost:9200/_cat/indices?v&pretty'
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open cscfcounter MWNXpegeTuacRlK2bMpbHg 5 1 20943 0 11.6mb 5.8mb
root@kishan>