Brian Jones wrote:
I can't wrap my head around the difference between the field attributes
"enabled," "index," and "store." How is setting a field to { "enabled" :
false }, different than setting it to { "index" : "no" }? What part does
"store" play in all this? Is { "store" : "yes" } the same as { "index" :
"not_analyzed" }?
If _index is enabled, your doc will store where it's indexed in a
field in the doc.
"index" in the mapping refers to the analysis of the field data
during indexing operation. It determines how text is tokenized and
filtered.
"store" allows a field to be stored in the Lucene document as its own
Field. This is traditionally how you would store data in a
Lucene-based search engine.
_source is an optimized field stored in Lucene that ES manages for
you. It's very efficient to store and retrieve. I hear you that it
seems intuitive it would be slower to deserialize a field full of all
the fields' data rather than a single field with just what you want,
but the difference is so small you will probably feel the pain
somewhere else before you ever see it there (namely IO).
For 99.9% of cases, _source is performant enough that its convenience
outweighs selectively storing. It's compressed in a binary format
that is really fast and really small. It also enables you to be able
to reindex data easily. We recommend you use it until you have a
measurable need to not use it. Often it's a premature optimization
to not use it.
-Drew
--
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.
For more options, visit https://groups.google.com/groups/opt_out.