# Delete by query - doesn't return the number of deletions?

**URL:** <https://discuss.elastic.co/t/delete-by-query-doesnt-return-the-number-of-deletions/4860>\
**Category:** Elasticsearch\
**Created:** [July 14, 2011, 2:57pm UTC](https://discuss.elastic.co/t/delete-by-query-doesnt-return-the-number-of-deletions/4860 "2011-07-14T14:57:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian\_clark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ian_clark/32/3129_2.png) [@ian\_clark](https://discuss.elastic.co/u/ian_clark)\
**Post date:** [July 14, 2011, 2:57pm UTC](https://discuss.elastic.co/t/delete-by-query-doesnt-return-the-number-of-deletions/4860/1 "2011-07-14T14:57:11Z")

</div>

the delete by query call doesn't seem to return the number of  
documents deleted... Is this a deliberate omission? We could perform a  
search before and after the delete command, but it would be easier if  
it returned the count for each index in the call.

[http://www.elasticsearch.org/guide/reference/api/delete-by-query.html](http://www.elasticsearch.org/guide/reference/api/delete-by-query.html)

Shall I raise a Jira for it?

Ian

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 15, 2011, 5:22am UTC](https://discuss.elastic.co/t/delete-by-query-doesnt-return-the-number-of-deletions/4860/2 "2011-07-15T05:22:58Z")

</div>

Yes, it does not return it. In order to return the number its much more expensive (it does not require a refresh to do it).

On Thursday, July 14, 2011 at 5:57 PM, Ian wrote:

> the delete by query call doesn't seem to return the number of  
> documents deleted... Is this a deliberate omission? We could perform a  
> search before and after the delete command, but it would be easier if  
> it returned the count for each index in the call.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/delete-by-query.html)
> 
> Shall I raise a Jira for it?
> 
> Ian

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:00am UTC](https://discuss.elastic.co/t/delete-by-query-doesnt-return-the-number-of-deletions/4860/3 "2017-07-06T04:00:34Z")

</div>


