# How do I force the deletion of version-conflicting data

**URL:** <https://discuss.elastic.co/t/how-do-i-force-the-deletion-of-version-conflicting-data/184486>\
**Category:** Elasticsearch\
**Created:** [June 6, 2019, 2:51am UTC](https://discuss.elastic.co/t/how-do-i-force-the-deletion-of-version-conflicting-data/184486 "2019-06-06T02:51:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazyyanchao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crazyyanchao/32/47593_2.png) [@crazyyanchao](https://discuss.elastic.co/u/crazyyanchao)\
**Post date:** [June 6, 2019, 2:51am UTC](https://discuss.elastic.co/t/how-do-i-force-the-deletion-of-version-conflicting-data/184486/1 "2019-06-06T02:51:30Z")

</div>

Hi,  
We are now using \_delete\_by\_query to do the batch deletion of data. But in the process I see the VersionConflictEngineException **[type][id]: version conflict, current version [2] is different than the one provided [1]**.The version we are using is 5.5.3.Could it be a bug?How can I force deletion of version-conflicting data.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 6, 2019, 3:22am UTC](https://discuss.elastic.co/t/how-do-i-force-the-deletion-of-version-conflicting-data/184486/2 "2019-06-06T03:22:30Z")

</div>

Welcome! 🙂

Per [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.1/docs-delete-by-query.html);

> `_delete_by_query` gets a snapshot of the index when it starts and deletes what it finds using `internal` versioning. That means that you’ll get a version conflict if the document changes between the time when the snapshot was taken and when the delete request is processed. When the versions match the document is deleted.

So you will likely need to run the query again.

---

<div class="post-metadata">

**Author:** ![crazyyanchao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crazyyanchao/32/47593_2.png) [@crazyyanchao](https://discuss.elastic.co/u/crazyyanchao)\
**Post date:** [June 6, 2019, 4:09am UTC](https://discuss.elastic.co/t/how-do-i-force-the-deletion-of-version-conflicting-data/184486/3 "2019-06-06T04:09:21Z")

</div>

thanks:)

---

<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 4, 2019, 4:09am UTC](https://discuss.elastic.co/t/how-do-i-force-the-deletion-of-version-conflicting-data/184486/4 "2019-07-04T04:09:28Z")

</div>

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