# Version conflict - no document found on update-by-query

**URL:** <https://discuss.elastic.co/t/version-conflict-no-document-found-on-update-by-query/338262>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [July 12, 2023, 10:21pm UTC](https://discuss.elastic.co/t/version-conflict-no-document-found-on-update-by-query/338262 "2023-07-12T22:21:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balagopal\_Kanattil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balagopal_kanattil/32/123380_2.png) [@Balagopal\_Kanattil](https://discuss.elastic.co/u/Balagopal_Kanattil)\
**Post date:** [July 12, 2023, 10:21pm UTC](https://discuss.elastic.co/t/version-conflict-no-document-found-on-update-by-query/338262/1 "2023-07-12T22:21:14Z")

</div>

Hi,

I am running a self hosted ES cluster with version 6.8.1. I am trying to update some docs using update-by-query API.

It fails for some documents with following error:

```auto
version_conflict_engine_exception 
version conflict, required seqNo [16893467], primary term [1]. but no document was found

```

I tried to find the document with `GET /index/_doc/<id>` call and it returns not found, though doing a `_search` by query is returning the document.

I also did a re-index and version\_conflict\_engine\_exception is not showing up after reindexing, and also `GET /index/_doc/<id>` is now returning the doc.

What is the issue with my old index? Any pointers on what the underlying issue might be?

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [July 14, 2023, 3:40pm UTC](https://discuss.elastic.co/t/version-conflict-no-document-found-on-update-by-query/338262/2 "2023-07-14T15:40:24Z")

</div>

Hi @Balagopal_Kanattil

> [@Balagopal\_Kanattil](#):
>
> I tried to find the document with `GET /index/_doc/<id>` call and it returns not found

Didn't you look for another value other than the document id?  
Is the document's \_id generated by Elasticsearch or do you manage it yourself?

---

<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:** [August 11, 2023, 3:40pm UTC](https://discuss.elastic.co/t/version-conflict-no-document-found-on-update-by-query/338262/3 "2023-08-11T15:40:36Z")

</div>

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