# Simple question about "store" attribute

**URL:** https://discuss.elastic.co/t/simple-question-about-store-attribute/5511
**Category:** Elasticsearch
**Created:** [October 4, 2011, 9:22am UTC](https://discuss.elastic.co/t/simple-question-about-store-attribute/5511 "2011-10-04T09:22:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![erlo](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@erlo](https://discuss.elastic.co/u/erlo)
#### Post date: [October 4, 2011, 9:22am UTC](https://discuss.elastic.co/t/simple-question-about-store-attribute/5511/1 "2011-10-04T09:22:52Z")

</div>

Hello everybody,

I have a simple question about the store attribute for a string field  
mapping.

The doc says that if it is defined to "yes", the field is stored with  
the index, otherwise it is not specifically stored, but can be retrieved  
because the document itself is stored.

Why it can be necessary to store the field in the index ? (In this case,  
the field will be stored twice with exactly the same content ...?)

Thanks

--  
Erwan

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [October 4, 2011, 11:10am UTC](https://discuss.elastic.co/t/simple-question-about-store-attribute/5511/2 "2011-10-04T11:10:41Z")

</div>

This can come in handy if you have a very large json document, and you want  
to fetch a single field, with the cost of loading the whole \_source and  
parsing it is not worth it compared to fetching it as a stored field. Also,  
\_source can be disabled, and you might still want to store some fields.

On Tue, Oct 4, 2011 at 11:22 AM, Erwan Loaëc [erwan.loaec@cgin.fr](mailto:erwan.loaec@cgin.fr) wrote:

> Hello everybody,
> 
> I have a simple question about the store attribute for a string field  
> mapping.
> 
> The doc says that if it is defined to "yes", the field is stored with the  
> index, otherwise it is not specifically stored, but can be retrieved because  
> the document itself is stored.
> 
> Why it can be necessary to store the field in the index ? (In this case,  
> the field will be stored twice with exactly the same content ...?)
> 
> Thanks
> 
> --  
> Erwan

---

<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:52am UTC](https://discuss.elastic.co/t/simple-question-about-store-attribute/5511/3 "2017-07-06T03:52:52Z")

</div>


