# 'store=true' of field mapping?

**URL:** <https://discuss.elastic.co/t/store-true-of-field-mapping/14657>\
**Category:** Elasticsearch\
**Created:** [December 2, 2013, 10:02am UTC](https://discuss.elastic.co/t/store-true-of-field-mapping/14657 "2013-12-02T10:02:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Min\_Cha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/min_cha/32/1131_2.png) [@Min\_Cha](https://discuss.elastic.co/u/Min_Cha)\
**Post date:** [December 2, 2013, 10:02am UTC](https://discuss.elastic.co/t/store-true-of-field-mapping/14657/1 "2013-12-02T10:02:38Z")

</div>

Hello folks.

I have a simple question about "store=true" of field mapping.  
I thought that "store=true" is like clusted-index on MySQL so I expected a  
benefit when searching something and accessing stored fields because of  
removing a random I/O for retrieving an original JSON.

In my performance testing, however, "store=true" looked like that there was  
no performance benefit even if I used '\_fields' on my script. '\_doc' is  
more faster than '\_fields'. If this is a fact, why there is "store=true"  
option?

Please give me some advice.  
Thanks.

--  
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/70eef818-b3be-454d-b9fa-5f9856c18a70%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/70eef818-b3be-454d-b9fa-5f9856c18a70%40googlegroups.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:** [December 2, 2013, 4:26pm UTC](https://discuss.elastic.co/t/store-true-of-field-mapping/14657/2 "2013-12-02T16:26:04Z")

</div>

Hey,

this is true. Using the store' parameter will does not have any impact on  
the field being searchable (as the search is not executed using the stored  
field. but rather on the inverted index). Setting this for a field will  
result in the content of the field being stored as an own part. This is  
useful if you do not store the whole source of a document (which is by  
default returned in any search query), but still need to access certain  
fields.

You should read the lucene documentation about this, if you are interested  
for more (and the reason why this setting exists - and why you might be  
able to pretty much ignore it with elasticsearch).

--Alex

On Mon, Dec 2, 2013 at 11:02 AM, Min Cha [minslovey@gmail.com](mailto:minslovey@gmail.com) wrote:

> Hello folks.
> 
> I have a simple question about "store=true" of field mapping.  
> I thought that "store=true" is like clusted-index on MySQL so I expected a  
> benefit when searching something and accessing stored fields because of  
> removing a random I/O for retrieving an original JSON.
> 
> In my performance testing, however, "store=true" looked like that there  
> was no performance benefit even if I used '\_fields' on my script. '\_doc' is  
> more faster than '\_fields'. If this is a fact, why there is "store=true"  
> option?
> 
> Please give me some advice.  
> Thanks.
> 
> --  
> 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/70eef818-b3be-454d-b9fa-5f9856c18a70%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/70eef818-b3be-454d-b9fa-5f9856c18a70%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9m9n20bi21RGgv2Mcn\_dWZ4vwKRG8EXgFvK35bwTxVsQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9m9n20bi21RGgv2Mcn_dWZ4vwKRG8EXgFvK35bwTxVsQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Michael\_Lussier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_lussier/32/1591_2.png) [@Michael\_Lussier](https://discuss.elastic.co/u/Michael_Lussier)\
**Post date:** [December 6, 2013, 3:20am UTC](https://discuss.elastic.co/t/store-true-of-field-mapping/14657/3 "2013-12-06T03:20:30Z")

</div>

Hello Min Cha.

Hello folks.

I have a simple question about "store=true" of field mapping.

I assume you mean "store=yes"?

If this is a fact, why there is "store=true" option?

The reason for "store=yes" is, for instance, to explicitly store a field when \_source is disabled. Or when the document fields are very large and you only want specific fields, saving performance from grabbing the very large \_source and instead grabbing specific fields could be faster for the request. Though it can be a good idea in some cases to keep \_source and specify stored fields. But in most cases storing \_source and parsing it will be faster. Because when storing fields, say for example you store the "name","age","location" fields of a document by themselves. If you want to retrieve those fields from several documents. Retrieving each field in most cases will be slower than grabbing the \_source and parsing "name","age","location" from the document. Also remember that store is not enabled by default, and \_source is enabled by default.

This post by kimchy (shay banon)  
[http://elasticsearch-users.115913.n3.nabble.com/What-does-it-mean-to-quot-store-quot-a-field-td3514176.html#a3562299](http://elasticsearch-users.115913.n3.nabble.com/What-does-it-mean-to-quot-store-quot-a-field-td3514176.html#a3562299)

And this post by javanna (Luca Cavanna)

> <https://stackoverflow.com/questions/15299799/elasticsearch-impact-of-setting-a-not-analyzed-field-as-storeyes>

These may offer more insight, I'm basically echoing what they are saying in the way I understand store.

---

<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:02am UTC](https://discuss.elastic.co/t/store-true-of-field-mapping/14657/4 "2017-07-06T02:02:57Z")

</div>


