# Documents version getting set to -1

**URL:** <https://discuss.elastic.co/t/documents-version-getting-set-to-1/253492>\
**Category:** Elasticsearch\
**Created:** [October 27, 2020, 8:50pm UTC](https://discuss.elastic.co/t/documents-version-getting-set-to-1/253492 "2020-10-27T20:50:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![natasha\_adewar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/natasha_adewar/32/71964_2.png) [@natasha\_adewar](https://discuss.elastic.co/u/natasha_adewar)\
**Post date:** [October 27, 2020, 8:50pm UTC](https://discuss.elastic.co/t/documents-version-getting-set-to-1/253492/1 "2020-10-27T20:50:38Z")

</div>

We are migrating ES from 2.4 to 5.6. Before migrating we copy all the documents from Index A to Index B. After migrating to 5.6 we are seeing many of the documents version on Index B is getting set to -1, hence the delete by query fails to delete these documents. Also the GET api returns found as false on ES 5.6 although we can see the document on the index. While copying the data from Index A to Index B we are using the default internal versioning. Request any inputs on this.

---

<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:** [November 24, 2020, 8:50pm UTC](https://discuss.elastic.co/t/documents-version-getting-set-to-1/253492/2 "2020-11-24T20:50:40Z")

</div>

Closed on November 24, 2020, 8:50pm UTC

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