Simple question about "store" attribute

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

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 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