# Document already exists

**URL:** https://discuss.elastic.co/t/document-already-exists/187317
**Category:** Elasticsearch
**Created:** [June 25, 2019, 11:35am UTC](https://discuss.elastic.co/t/document-already-exists/187317 "2019-06-25T11:35:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Alex\_Davidovich](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Alex\_Davidovich](https://discuss.elastic.co/u/Alex_Davidovich)
#### Post date: [June 25, 2019, 11:35am UTC](https://discuss.elastic.co/t/document-already-exists/187317/1 "2019-06-25T11:35:30Z")

</div>

Working with elastic 5.4.3 on 3 nodes cluster with 1 shard and 2 replicas.  
During a test, node-3 was killed. At the same time, tried to index a document.  
This scenario should result in creating the document successfully.  
What happened was that elastic responded with

```

org.elasticsearch.index.engine.VersionConflictEngineException: [events][5523]: version conflict, document already exists (current version [1])

```

The id of this document was used only for this operation. I believe that the killing caused elastic transport client to try and index the document twice.  
Could it be?  
Eventually, the document was found in the index but still want to know what caused the duplicate 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: [July 23, 2019, 11:35am UTC](https://discuss.elastic.co/t/document-already-exists/187317/2 "2019-07-23T11:35:34Z")

</div>

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