# Index of field lost during update the document

**URL:** https://discuss.elastic.co/t/index-of-field-lost-during-update-the-document/13734
**Category:** Elasticsearch
**Created:** [September 24, 2013, 11:25am UTC](https://discuss.elastic.co/t/index-of-field-lost-during-update-the-document/13734 "2013-09-24T11:25:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)
#### Post date: [September 24, 2013, 11:25am UTC](https://discuss.elastic.co/t/index-of-field-lost-during-update-the-document/13734/1 "2013-09-24T11:25:29Z")

</div>

Hi All,

We want to update an record into ES without enabling \_source field.  
\*  
For example:\* Let as consider, an document contains four fields ( {_col1_(store=true,index=true)}, {  
_col2_ (store=false, index=true)}, {_col3_ (store=true,index=true)}, {_col4_(store=true, index=true)} ). while updation, we would like to update only  
value of col3 and keep store and index of rest of fields unchanged.

_Issue:_ While updating the value of _col3_, the index of _col2_ got lost  
because the value of _col2_ is only indexed in ElasticSearch.

Regards,  
Ankit Jain

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [September 26, 2013, 8:51pm UTC](https://discuss.elastic.co/t/index-of-field-lost-during-update-the-document/13734/2 "2013-09-26T20:51:56Z")

</div>

Hey,

please see the documentation at

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

'The \_source field need to be enabled for this feature to work.'

So you will have to use the source field.

--Alex

On Tue, Sep 24, 2013 at 1:25 PM, Ankit Jain [ankitjaincs06@gmail.com](mailto:ankitjaincs06@gmail.com) wrote:

> Hi All,
> 
> We want to update an record into ES without enabling \_source field.  
> \*  
> For example:\* Let as consider, an document contains four fields ( {_col1_(store=true,index=true)}, {  
> _col2_ (store=false, index=true)}, {_col3_ (store=true,index=true)}, {\*  
> col4\* (store=true, index=true)} ). while updation, we would like to  
> update only value of col3 and keep store and index of rest of fields  
> unchanged.
> 
> _Issue:_ While updating the value of _col3_, the index of _col2_ got lost  
> because the value of _col2_ is only indexed in Elasticsearch.
> 
> Regards,  
> Ankit Jain
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)
#### Post date: [September 30, 2013, 10:24am UTC](https://discuss.elastic.co/t/index-of-field-lost-during-update-the-document/13734/3 "2013-09-30T10:24:16Z")

</div>

Thanks Alexander..

But, we are not storing the value of few fields and only indexing them into  
ES. So, is it possible to maintain the index of those fields during update  
call?

Regards,  
Ankit Jain

On Friday, 27 September 2013 02:21:56 UTC+5:30, Alexander Reelsen wrote:

> Hey,
> 
> please see the documentation at  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/update/)  
> 'The \_source field need to be enabled for this feature to work.'
> 
> So you will have to use the source field.
> 
> --Alex
> 
> On Tue, Sep 24, 2013 at 1:25 PM, Ankit Jain \<[ankitj...@gmail.com](mailto:ankitj...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi All,
> > 
> > We want to update an record into ES without enabling \_source field.  
> > \*  
> > For example:\* Let as consider, an document contains four fields ( {_col1_(store=true,index=true)}, {  
> > _col2_ (store=false, index=true)}, {_col3_ (store=true,index=true)}, {\*  
> > col4\* (store=true, index=true)} ). while updation, we would like to  
> > update only value of col3 and keep store and index of rest of fields  
> > unchanged.
> > 
> > _Issue:_ While updating the value of _col3_, the index of _col2_ got  
> > lost because the value of _col2_ is only indexed in Elasticsearch.
> > 
> > Regards,  
> > Ankit Jain
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:14am UTC](https://discuss.elastic.co/t/index-of-field-lost-during-update-the-document/13734/4 "2017-07-06T02:14:16Z")

</div>


