# Wait for completion option in delete query for es 2.3

**URL:** <https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402>\
**Category:** Elasticsearch\
**Created:** [May 6, 2020, 8:14pm UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402 "2020-05-06T20:14:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nomanahmed](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@nomanahmed](https://discuss.elastic.co/u/nomanahmed)\
**Post date:** [May 6, 2020, 8:14pm UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402/1 "2020-05-06T20:14:23Z")

</div>

Do we have wait for completion option in delete query for es 2.3? I search but found nothing, can anyone confirm and point me to any alternative method of it?

## Command I m using

curl --request DELETE "[http://localhost:9200/](http://localhost:9200/)/\_query" -d '{}'

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 7, 2020, 1:32am UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402/2 "2020-05-07T01:32:38Z")

</div>

Welcome!

Did you mean to delete all existing data in all indices?

If so, use the DELETE index API. It will be much much much faster.

---

<div class="post-metadata">

**Author:** ![nomanahmed](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@nomanahmed](https://discuss.elastic.co/u/nomanahmed)\
**Post date:** [May 7, 2020, 1:10pm UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402/3 "2020-05-07T13:10:55Z")

</div>

no. I meant to delete specific data based on field (routing) from an index. I know delete API wont work here.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 7, 2020, 3:04pm UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402/4 "2020-05-07T15:04:32Z")

</div>

I don't even remember if delete by query existed in 2.x. Was that available as a plugin or so?

This version is so old that you should really upgrade to at least 6.8 or 7.6.

---

<div class="post-metadata">

**Author:** ![nomanahmed](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@nomanahmed](https://discuss.elastic.co/u/nomanahmed)\
**Post date:** [May 7, 2020, 5:04pm UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402/5 "2020-05-07T17:04:26Z")

</div>

yeah David, delete by query is not available in 2.3. Do you know if it is available via plugin? if yes then what will be the setup? please just guide me in simple and precise words.

For now, it can't be upgraded that is the real problem, but soon it will be.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 28, 2020, 1:10pm UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402/6 "2020-05-28T13:10:01Z")

</div>

Have a look at [https://www.elastic.co/guide/en/elasticsearch/plugins/2.3/plugins-delete-by-query.html](https://www.elastic.co/guide/en/elasticsearch/plugins/2.3/plugins-delete-by-query.html)

---

<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:** [June 25, 2020, 1:10pm UTC](https://discuss.elastic.co/t/wait-for-completion-option-in-delete-query-for-es-2-3/231402/7 "2020-06-25T13:10:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
