# Help: Bulk Update doesn't work

**URL:** <https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153>\
**Category:** Elasticsearch\
**Created:** [December 2, 2015, 11:17am UTC](https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153 "2015-12-02T11:17:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Ghisleni](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Ivan\_Ghisleni](https://discuss.elastic.co/u/Ivan_Ghisleni)\
**Post date:** [December 2, 2015, 11:17am UTC](https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153/1 "2015-12-02T11:17:26Z")

</div>

Hi to everyone,

I have this problem when I'm trying to to update with the bulk operation:

**Command:**  
curl -XPOST localhost:9200/\_bulk?pretty -d '{ "update" : { "\_index" : "test", "\_type" : "type1", "\_id" : "1"} } { "doc": { "field1" : "value2" }}'

**Response:**  
{  
"error" : {  
"root\_cause" : [ {  
"type" : "action\_request\_validation\_exception",  
"reason" : "Validation Failed: 1: no requests added;"  
} ],  
"type" : "action\_request\_validation\_exception",  
"reason" : "Validation Failed: 1: no requests added;"  
},  
"status" : 400  
}

**Index content:**

{  
"took": 2,  
"timed\_out": false,  
"\_shards": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"hits": {  
"total": 2,  
"max\_score": 1,  
"hits": [  
{  
"\_index": "test",  
"\_type": "type1",  
"\_id": "3",  
"\_score": 1,  
"\_source": {  
"field1": "value3"  
}  
},  
{  
"\_index": "test",  
"\_type": "type1",  
"\_id": "1",  
"\_score": 1,  
"\_source": {  
"field1": "value1"  
}  
}  
]  
}  
}

**If I run the command:**  
curl -XPOST localhost:9200/test/type1/1 -d '{ "doc": { "field1" : "value2" }}'  
**it works.**

**This is my Version:**

"version" : {  
"number" : "2.1.0",  
"build\_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87",  
"build\_timestamp" : "2015-11-18T22:40:03Z",  
"build\_snapshot" : false,  
"lucene\_version" : "5.3.1"  
}

what's wrong??

Ivan

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 2, 2015, 11:45am UTC](https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153/2 "2015-12-02T11:45:28Z")

</div>

The two JSON documents that make up your bulk request should be on separate lines and this does not seem to be the case.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 3, 2015, 5:08am UTC](https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153/3 "2015-12-03T05:08:28Z")

</div>

You will also need a `\n` at the end of the line.

---

<div class="post-metadata">

**Author:** ![Ivan\_Ghisleni](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Ivan\_Ghisleni](https://discuss.elastic.co/u/Ivan_Ghisleni)\
**Post date:** [December 3, 2015, 10:39am UTC](https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153/4 "2015-12-03T10:39:57Z")

</div>

Thanks for the help  
\n saved me  
😉

---

<div class="post-metadata">

**Author:** ![kmchmk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kmchmk/32/14076_2.png) [@kmchmk](https://discuss.elastic.co/u/kmchmk)\
**Post date:** [December 22, 2016, 11:31am UTC](https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153/5 "2016-12-22T11:31:32Z")

</div>

Thanks!  
"/n" worked.

---

<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, 10:04pm UTC](https://discuss.elastic.co/t/help-bulk-update-doesnt-work/36153/6 "2017-07-05T22:04:42Z")

</div>


