# How to update a document using the Elasticsearch Update API when "\_source" is disabled?

**URL:** <https://discuss.elastic.co/t/how-to-update-a-document-using-the-elasticsearch-update-api-when--source-is-disabled/18457>\
**Category:** Elasticsearch\
**Created:** [July 3, 2014, 9:06am UTC](https://discuss.elastic.co/t/how-to-update-a-document-using-the-elasticsearch-update-api-when--source-is-disabled/18457 "2014-07-03T09:06:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veerapuram\_Varadhan](https://avatars.discourse-cdn.com/v4/letter/v/45deac/32.png) [@Veerapuram\_Varadhan](https://discuss.elastic.co/u/Veerapuram_Varadhan)\
**Post date:** [July 3, 2014, 9:06am UTC](https://discuss.elastic.co/t/how-to-update-a-document-using-the-elasticsearch-update-api-when--source-is-disabled/18457/1 "2014-07-03T09:06:45Z")

</div>

Hi,

In my setup, ES is used for only indexing and searching and thus have  
disabled "\_source" to reduce storage costs and overheads. Our application  
does a lot of updates and when trying to partially update documents in ES,  
I am getting the following exception:

curl -X POST  
"[http://localhost:9200/mydb.mycoln/mytype/C97780C0-E49E-1031-86AA-005056A564B9/\_update?refresh=false](http://localhost:9200/mydb.mycoln/mytype/C97780C0-E49E-1031-86AA-005056A564B9/_update?refresh=false)"  
-d '  
{"doc": {"iuid": "1", "crit": 50, "stt": 0, "otype": "User", "acrtby": 1}}'

{"error":"DocumentSourceMissingException[[mydb.mycoln][3]  
[mytype][C97780C0-E49E-1031-86AA-005056A564B9]: document source  
missing]","status":400}

Is there anyway to workaround this and still be able to update documents  
partitally?

Note: Each document has 600+ fields and thus, fetching all the fields and  
performing an complete 'index' of the document would be a performance  
bottleneck for the application.

Best,

V. Varadhan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f8bee40f-f4c7-4238-b8b2-3516400bd2ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8bee40f-f4c7-4238-b8b2-3516400bd2ba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [July 3, 2014, 8:50pm UTC](https://discuss.elastic.co/t/how-to-update-a-document-using-the-elasticsearch-update-api-when--source-is-disabled/18457/2 "2014-07-03T20:50:07Z")

</div>

Source is required to update documents. If not, you would need access to  
the original information and re-index.

--  
Ivan

On Thu, Jul 3, 2014 at 2:06 AM, Veerapuram Varadhan [v.varadhan@gmail.com](mailto:v.varadhan@gmail.com)  
wrote:

> Hi,
> 
> In my setup, ES is used for only indexing and searching and thus have  
> disabled "\_source" to reduce storage costs and overheads. Our application  
> does a lot of updates and when trying to partially update documents in ES,  
> I am getting the following exception:
> 
> curl -X POST "  
> [http://localhost:9200/mydb.mycoln/mytype/C97780C0-E49E-1031-86AA-005056A564B9/\_update?refresh=false](http://localhost:9200/mydb.mycoln/mytype/C97780C0-E49E-1031-86AA-005056A564B9/_update?refresh=false)"  
> -d '  
> {"doc": {"iuid": "1", "crit": 50, "stt": 0, "otype": "User", "acrtby": 1}}'
> 
> {"error":"DocumentSourceMissingException[[mydb.mycoln][3]  
> [mytype][C97780C0-E49E-1031-86AA-005056A564B9]: document source  
> missing]","status":400}
> 
> Is there anyway to workaround this and still be able to update documents  
> partitally?
> 
> Note: Each document has 600+ fields and thus, fetching all the fields and  
> performing an complete 'index' of the document would be a performance  
> bottleneck for the application.
> 
> Best,
> 
> V. Varadhan
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/f8bee40f-f4c7-4238-b8b2-3516400bd2ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8bee40f-f4c7-4238-b8b2-3516400bd2ba%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/f8bee40f-f4c7-4238-b8b2-3516400bd2ba%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f8bee40f-f4c7-4238-b8b2-3516400bd2ba%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCdgQznTrUhjRtHfL0Ksy2m8%2BdDYOVUt9HhFJc29hzTrA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCdgQznTrUhjRtHfL0Ksy2m8%2BdDYOVUt9HhFJc29hzTrA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:18am UTC](https://discuss.elastic.co/t/how-to-update-a-document-using-the-elasticsearch-update-api-when--source-is-disabled/18457/3 "2017-07-06T01:18:00Z")

</div>


