# Delete by Query in ES 2.0

**URL:** <https://discuss.elastic.co/t/delete-by-query-in-es-2-0/36331>\
**Category:** Elasticsearch\
**Created:** [December 4, 2015, 12:24am UTC](https://discuss.elastic.co/t/delete-by-query-in-es-2-0/36331 "2015-12-04T00:24:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjdepaul](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jjdepaul](https://discuss.elastic.co/u/jjdepaul)\
**Post date:** [December 4, 2015, 12:24am UTC](https://discuss.elastic.co/t/delete-by-query-in-es-2-0/36331/1 "2015-12-04T00:24:44Z")

</div>

There are a number of threads on this topic, but I can't make it work in ES 2.0 I've looked at the documentation for Delete API but it only mentions delete by document id.

I would like to:

1. Query for a set of records with a given set of attributes and
2. Delete that same set based on the same set of query parms

This is so I can remove some of the entries from a large dataset without having to reload that whole data set from scratch.

Please let point me in the right direction.

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [December 4, 2015, 12:32am UTC](https://discuss.elastic.co/t/delete-by-query-in-es-2-0/36331/2 "2015-12-04T00:32:44Z")

</div>

Delete by query was moved to a plugin in 2.0:  
[https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html)

---

<div class="post-metadata">

**Author:** ![jjdepaul](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jjdepaul](https://discuss.elastic.co/u/jjdepaul)\
**Post date:** [December 4, 2015, 2:23pm UTC](https://discuss.elastic.co/t/delete-by-query-in-es-2-0/36331/3 "2015-12-04T14:23:24Z")

</div>

Thank you much -

---

<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 5, 2017, 11:33pm UTC](https://discuss.elastic.co/t/delete-by-query-in-es-2-0/36331/4 "2017-07-05T23:33:32Z")

</div>


