# Bulk operation using Delete by Query?

**URL:** <https://discuss.elastic.co/t/bulk-operation-using-delete-by-query/17065>\
**Category:** Elasticsearch\
**Created:** [April 17, 2014, 6:20pm UTC](https://discuss.elastic.co/t/bulk-operation-using-delete-by-query/17065 "2014-04-17T18:20:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robbie](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@Robbie](https://discuss.elastic.co/u/Robbie)\
**Post date:** [April 17, 2014, 6:20pm UTC](https://discuss.elastic.co/t/bulk-operation-using-delete-by-query/17065/1 "2014-04-17T18:20:15Z")

</div>

Hi,  
I have a bunch of documents that need to be deleted using the  
DeleteByQuery API. I would like these to be deleted using the bulk api so  
that I dont have to call deleteByQuery multiple times. I see that the Bulk  
API only takes in a DeleteRequest. Is there any way I can group together a  
bunch of DeleteByQueryRequests using the DeleteByQueryRequestBuilder, and  
then use the BulkRequestBuilder to execute them in bulk?

Thanks!  
Robbie

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/20f22064-010d-4137-ab41-4ece9275b3db%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/20f22064-010d-4137-ab41-4ece9275b3db%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:35am UTC](https://discuss.elastic.co/t/bulk-operation-using-delete-by-query/17065/2 "2017-07-06T01:35:09Z")

</div>


