# How can I fix document version issues / conflicts

**URL:** <https://discuss.elastic.co/t/how-can-i-fix-document-version-issues-conflicts/158617>\
**Category:** Elasticsearch\
**Created:** [November 28, 2018, 4:19pm UTC](https://discuss.elastic.co/t/how-can-i-fix-document-version-issues-conflicts/158617 "2018-11-28T16:19:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![afshinmoshrefi](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@afshinmoshrefi](https://discuss.elastic.co/u/afshinmoshrefi)\
**Post date:** [November 28, 2018, 4:19pm UTC](https://discuss.elastic.co/t/how-can-i-fix-document-version-issues-conflicts/158617/1 "2018-11-28T16:19:43Z")

</div>

I made a mistake when creating an index by doing an update before the last update was finished. The consequence is that I have version conflicts when trying to do updates across the whole index.  
How can I reset the document versions and set them all back to version 0?

---

<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:** [November 29, 2018, 1:49am UTC](https://discuss.elastic.co/t/how-can-i-fix-document-version-issues-conflicts/158617/2 "2018-11-29T01:49:02Z")

</div>

The only way to do that is delete everything and start again.

But if you have a higher version updating things, doesn't that implicitly invalidate older updates?

---

<div class="post-metadata">

**Author:** ![afshinmoshrefi](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@afshinmoshrefi](https://discuss.elastic.co/u/afshinmoshrefi)\
**Post date:** [November 29, 2018, 2:54pm UTC](https://discuss.elastic.co/t/how-can-i-fix-document-version-issues-conflicts/158617/3 "2018-11-29T14:54:26Z")

</div>

I have the exact documents in place that I want. The process I went through was

1. add documents
2. update location field for the added documents
3. add additional documents
4. update location field only for the new documents
5. try to add a new field for all documents - That's when I get a version conflict error.

---

<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:** [December 27, 2018, 2:54pm UTC](https://discuss.elastic.co/t/how-can-i-fix-document-version-issues-conflicts/158617/4 "2018-12-27T14:54:35Z")

</div>

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