# Document\_missing\_exception on Upsert

**URL:** https://discuss.elastic.co/t/document-missing-exception-on-upsert/78191
**Category:** Elasticsearch
**Created:** [March 11, 2017, 1:58am UTC](https://discuss.elastic.co/t/document-missing-exception-on-upsert/78191 "2017-03-11T01:58:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![skilledDeveloper](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skilleddeveloper/32/52979_2.png) [@skilledDeveloper](https://discuss.elastic.co/u/skilledDeveloper)
#### Post date: [March 11, 2017, 1:58am UTC](https://discuss.elastic.co/t/document-missing-exception-on-upsert/78191/1 "2017-03-11T01:58:09Z")

</div>

I use bulk update and have set "doc\_as\_upsert": true  
However, SOMETIMES I get errors like this:

"update": {  
"\_index": "artists",  
"\_type": "artist",  
"\_id": "fernanda-francis",  
"status": 404,  
"error": {  
"type": "document\_missing\_exception",  
"reason": "[artist][fernanda-francis]: document missing",  
"index\_uuid": "q7Yl-ftoS4WD3eE1j0D0kQ",  
"shard": "3",  
"index": "artists"  
}  
}

Any ideas why this happens? Isn't it supposed to insert the doc if it doesn't exist?

ES v5.1 on AWS.

---

<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: [April 8, 2017, 1:58am UTC](https://discuss.elastic.co/t/document-missing-exception-on-upsert/78191/2 "2017-04-08T01:58:13Z")

</div>

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