# Create return 409 on non conflict items

**URL:** https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484
**Category:** Elasticsearch
**Created:** [November 13, 2015, 4:42am UTC](https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484 "2015-11-13T04:42:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fastae](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@fastae](https://discuss.elastic.co/u/fastae)
#### Post date: [November 13, 2015, 4:42am UTC](https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484/1 "2015-11-13T04:42:15Z")

</div>

We are storing data from wearable devices to ES, and having a weird situation here.

We are 'create'ing the document and we are getting 409(DocumentAlreadyExistsException) when there isn't any existing document at all.

I'm wondering if we can handle issue.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 13, 2015, 5:52am UTC](https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484/2 "2015-11-13T05:52:21Z")

</div>

How do you index your documents?  
Which exact call?

---

<div class="post-metadata">

### Author: ![fastae](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@fastae](https://discuss.elastic.co/u/fastae)
#### Post date: [November 13, 2015, 6:12am UTC](https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484/3 "2015-11-13T06:12:10Z")

</div>

@dadoonet thanks for the quick response... we used bulk API as below

```
{"create":{"_index":"sleepdata","_type":"n1-njsmnfee1f3oh72zg","_id":1447186076}}
 {"start":"2015-11-10T20:07:56.000Z","end":"2015-11-10T22:58:56.000Z","startIndex":585,"endIndex":761,"info":{"graph":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0],"restlessCount":3,"wakeupCount":0,"averageDiff":2.0760233918128654,"totalTime":171,"totalBadTime":9,"deepMinute":6},"oldstart":"2015-11-10T20:02:56.000Z","oldEnd":"2015-11-10T22:58:56.000Z","id":1447186076,"startUnix":1447186076,"endUnix":1447196336}

```

We are certain that the id is not been created before.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 13, 2015, 7:00am UTC](https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484/4 "2015-11-13T07:00:55Z")

</div>

Try GET sleepdata/n1-njsmnfee1f3oh72zg/1447186076

---

<div class="post-metadata">

### Author: ![fastae](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@fastae](https://discuss.elastic.co/u/fastae)
#### Post date: [November 13, 2015, 9:39am UTC](https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484/5 "2015-11-13T09:39:32Z")

</div>

GET sleepdata/n1-njsmnfee1f3oh72zg/1447186076

It give us nothing ☹ We have looked pretty deeply, but couldn't find the reason. I know there are options on partial update retry\_on\_conflict, and I'm wondering if we can apply the same to 'create'.

This is not happening every single time, rather sporadically. We usually bulk several thousands documents to different index before we send the api. If that helps to understand better.

We are using ES 1.7.

---

<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 5, 2017, 11:38pm UTC](https://discuss.elastic.co/t/create-return-409-on-non-conflict-items/34484/6 "2017-07-05T23:38:41Z")

</div>


