The enabled attribute only applies to various Elasticsearch
specific/created fields such as _index and _size. User-supplied fields do
not have an "enabled" attribute.
Store and index are different. Store means the data is stored by Lucene
will return this data if asked. Stored fields are not necessarily
searchable. By default, fields are not stored, but full source is. Since
you want the defaults (which makes sense), simply do not set the store
attribute.
The index attribute is used for searching. Only indexed fields can be
searched. The reason for the differentiation is that indexed fields are
transformed during analysis, so you cannot retrieve the original data if it
is required. You do not want the default of "analyzed" for all fields, so
you need to disable it for the ones you do not want to search on
(free_text, more_text).
Many of the attributes you set for the "company" document type are not
valid document type attributes, The items under the right-hand-size Fields
section listed here, Elasticsearch Platform — Find real-time answers at scale | Elastic,
are valid for document types.
Cheers,
Ivan
On Tue, Feb 12, 2013 at 2:35 PM, Brian Jones tbrianjones@gmail.com 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" }?I generally use ES to retrieve the full _source for an indexed document,
but generally only need to search a few fields. So ... to maintain tight
control over index size and speed, I generally create my mappings with
everything turned off and then turn things on as needed in my mappings.What will be the difference between the way I've mapped the following
properties of the company type?{
"company" : {
"type" : "object",
"include_in_all" : false,
"index" : "no",
"enabled" : false
"path" : "full",
"dynamic" : true,
"store" : "no",
"properties" : {
"name" : { "type" : "string", "store" : "yes", "index" : "analyzed",
"enabled" : true },
"description" : { "type" : "string", "index" : "analyzed" }
"free_text" : { "type" : "string", "enabled" : true }
"more_text" : { "type" : "string", "store" : "yes" }
}
}
}--
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.
--
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.