# Delete by query API and external versioning

**URL:** <https://discuss.elastic.co/t/delete-by-query-api-and-external-versioning/178202>\
**Category:** Elasticsearch\
**Created:** [April 24, 2019, 9:21am UTC](https://discuss.elastic.co/t/delete-by-query-api-and-external-versioning/178202 "2019-04-24T09:21:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdomans](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mdomans/32/4625_2.png) [@mdomans](https://discuss.elastic.co/u/mdomans)\
**Post date:** [April 24, 2019, 9:21am UTC](https://discuss.elastic.co/t/delete-by-query-api-and-external-versioning/178202/1 "2019-04-24T09:21:13Z")

</div>

My problem is that I sometimes need to delete massive (well above 10k) documents with same value for a certain field. Not a problem, `_delete_by_query` with a filter for that value works nice.

The problem is that in my current setting an update/index operation with external versioning lower to that of the`_delete_by_query` will still have higher internal versioning number. Thus, rather than letting `_delete_by_query` drop the doc it will fail.

If this is correct is there any plan to add support for `external` versioning to `_delete_by_query`?

---

<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:** [May 22, 2019, 9:21am UTC](https://discuss.elastic.co/t/delete-by-query-api-and-external-versioning/178202/2 "2019-05-22T09:21:17Z")

</div>

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