# Update a field if \_source is disabled

**URL:** <https://discuss.elastic.co/t/update-a-field-if--source-is-disabled/18968>\
**Category:** Elasticsearch\
**Created:** [July 30, 2014, 6:52am UTC](https://discuss.elastic.co/t/update-a-field-if--source-is-disabled/18968 "2014-07-30T06:52:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [July 30, 2014, 6:52am UTC](https://discuss.elastic.co/t/update-a-field-if--source-is-disabled/18968/1 "2014-07-30T06:52:34Z")

</div>

Hi,

I read it here  
([http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html))  
that the \_source field needs to be enabled for Update API to work.

Does it mean that from Java or REST API, I cannot update any field defined  
in the type mapping unless the \_source is enabled?

Can I just use the stored:true on that field and update it? If so, can you  
please show an example?

Thanks,  
Sandeep

--  
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/4abea481-e8d4-4295-a450-45caecb2eaf8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4abea481-e8d4-4295-a450-45caecb2eaf8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 30, 2014, 7:02am UTC](https://discuss.elastic.co/t/update-a-field-if--source-is-disabled/18968/2 "2014-07-30T07:02:58Z")

</div>

No you can't as behind the scene the full document is removed and inserted with new values (new version).

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 juil. 2014 à 08:52, "'Sandeep Ramesh Khanzode' via elasticsearch" [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) a écrit :

Hi,

I read it here ([http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html)) that the \_source field needs to be enabled for Update API to work.

Does it mean that from Java or REST API, I cannot update any field defined in the type mapping unless the \_source is enabled?

Can I just use the stored:true on that field and update it? If so, can you please show an example?

Thanks,  
Sandeep

--  
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/4abea481-e8d4-4295-a450-45caecb2eaf8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4abea481-e8d4-4295-a450-45caecb2eaf8%40googlegroups.com).  
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/13292F23-3013-4E5E-A0A5-981F6D5D45F4%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/13292F23-3013-4E5E-A0A5-981F6D5D45F4%40pilato.fr).  
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:12am UTC](https://discuss.elastic.co/t/update-a-field-if--source-is-disabled/18968/3 "2017-07-06T01:12:19Z")

</div>


