# Using UPDATE API with \_source disabled

**URL:** <https://discuss.elastic.co/t/using-update-api-with--source-disabled/7063>\
**Category:** Elasticsearch\
**Created:** [March 19, 2012, 8:08pm UTC](https://discuss.elastic.co/t/using-update-api-with--source-disabled/7063 "2012-03-19T20:08:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Hummel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_hummel/32/1263_2.png) [@Felipe\_Hummel](https://discuss.elastic.co/u/Felipe_Hummel)\
**Post date:** [March 19, 2012, 8:08pm UTC](https://discuss.elastic.co/t/using-update-api-with--source-disabled/7063/1 "2012-03-19T20:08:53Z")

</div>

Is there any way to use the UPDATE API[http://www.elasticsearch.org/guide/reference/api/update.html](http://www.elasticsearch.org/guide/reference/api/update.html) with  
the \_source field disabled?

The examples use it:

"script" : "ctx.\_source.tags += tag",

I have a array/list field in my documents which represent user\_ids that  
shared that document, every time someone shares a document, we must add the  
user id to the list in the corresponding document .

Any thoughts?

---

<div class="post-metadata">

**Author:** ![Benjamin\_Deveze](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_deveze/32/1577_2.png) [@Benjamin\_Deveze](https://discuss.elastic.co/u/Benjamin_Deveze)\
**Post date:** [March 19, 2012, 9:57pm UTC](https://discuss.elastic.co/t/using-update-api-with--source-disabled/7063/2 "2012-03-19T21:57:15Z")

</div>

Hey Felipe no you can't use the update API with source disabled.

Le lundi 19 mars 2012, Felipe Hummel [felipehummel@gmail.com](mailto:felipehummel@gmail.com) a écrit :

> Is there any way to use the UPDATE API with the \_source field disabled?  
> The examples use it:  
> "script" : "ctx.\_source.tags += tag",  
> I have a array/list field in my documents which represent user\_ids that  
> shared that document, every time someone shares a document, we must add the  
> user id to the list in the corresponding document .
> 
> Any thoughts?

--  
Benjamin DEVEZE

---

<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 6, 2017, 3:35am UTC](https://discuss.elastic.co/t/using-update-api-with--source-disabled/7063/3 "2017-07-06T03:35:32Z")

</div>


