Friday 23 October 2015

Elasticsearch: Common Attributes for core data types


Attribute
Description
Index_name
The name of the field that will be stored in the index. Defaults to the property/field name.
index
We can assign any of 3 values “analyzed”, “not_analyzed” “no” to the attribute “index”.
“index” should set to “analyzed” for the field to be indexed and searchable after being broken down into token using an analyzer.not_analyzed” means that it’s still searchable, but does not go through any analysis process or broken down into tokens.”no” means that it won’t be searchable at all.
store
Set to true to actually store the field in the index, false to not store it. By default elastic search stores all the fields in index.
boost
“boost” attribute is used to increase the relative weight of a clause in query. Default value is 1.0
null_value
This attribute specifies the value written to index, if this field is not specified for the document.
copy_to
Attribute specifies a field, where all field values should be copied.

Ex:
{
  "book" : {
    "properties" : {
      "title" : { "type" : "string", "copy_to" : "meta_data" },
      "author" : { "type" : "string", "copy_to" : "meta_data" },
      "meta_data" : { "type" : "string" }
    }
}

All values from fields title and author will be copied to the field meta_data.

include_in_all
Attribute specifies whether this field is included in “_all” field or not.



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment