# Bulk update successful, but documents aren't updated

**URL:** <https://discuss.elastic.co/t/bulk-update-successful-but-documents-arent-updated/104587>\
**Category:** Elasticsearch\
**Created:** [October 19, 2017, 4:07pm UTC](https://discuss.elastic.co/t/bulk-update-successful-but-documents-arent-updated/104587 "2017-10-19T16:07:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Natalia\_Kuleniuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/natalia_kuleniuk/32/43727_2.png) [@Natalia\_Kuleniuk](https://discuss.elastic.co/u/Natalia_Kuleniuk)\
**Post date:** [October 19, 2017, 4:07pm UTC](https://discuss.elastic.co/t/bulk-update-successful-but-documents-arent-updated/104587/1 "2017-10-19T16:07:58Z")

</div>

I added new field to mapping, and then try to update all documents with new values for this field.

curl -XPOST 'https://my\_end\_point/myindex/mytype/\_bulk' -d '  
{"update":{"\_id":"1"}}  
{"doc": { "test\_field": "new field value 1"}}  
{"update":{"\_id":"2"}}  
{"doc": { "test\_field": "new field value 2"}}  
{"update":{"\_id":"3"}}  
{"doc": { "test\_field": "new field value 3"}}  
{"update":{"\_id":"4"}}  
{"doc": { "test\_field": "new field value 4"}}'

OUTPUT:  
{"took":21,"errors":false,"items":[{"update":{"\_index":"myindex","\_type":"mytype","\_id":"1","\_version":3,"status":200}},{"update":{"\_index":"myindex","\_type":"mytype","\_id":"2","\_version":2,"status":200}},{"update":{"\_index":"myindex","\_type":"mytype","\_id":"3","\_version":2,"status":200}}]}%

Then I am trying to retrieve all hits:  
curl -XGET 'https://my\_end\_point/myindex/mytype/\_search?pretty'

But hits does not contain new field with new value. They remaining the same as before bulk update  
Did I make a mistake or miss something?

!!! **! UPDATE:** I can see updated fields, all except for the last one. I don't see document with id 4 (which is the last one) to be updated

---

<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:** [October 19, 2017, 4:25pm UTC](https://discuss.elastic.co/t/bulk-update-successful-but-documents-arent-updated/104587/2 "2017-10-19T16:25:22Z")

</div>

You are missing the last line return at the end.

---

<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:** [November 16, 2017, 4:25pm UTC](https://discuss.elastic.co/t/bulk-update-successful-but-documents-arent-updated/104587/3 "2017-11-16T16:25:22Z")

</div>

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