Class: Elasticated::Mapping::Fields::AnalyzedStringField

Inherits:
FieldWithDocValues show all
Defined in:
lib/elasticated/mapping/fields/analyzed_string_field.rb

Instance Attribute Summary

Attributes inherited from FieldWithDocValues

#doc_values

Attributes inherited from StandardField

#name

Instance Method Summary collapse

Methods inherited from FieldWithDocValues

#initialize

Methods inherited from StandardField

#build, #initialize

Constructor Details

This class inherits a constructor from Elasticated::Mapping::Fields::FieldWithDocValues

Instance Method Details

#build_bodyObject



6
7
8
9
10
11
12
# File 'lib/elasticated/mapping/fields/analyzed_string_field.rb', line 6

def build_body
  body = { type: type }
  not_analyzed_string = StringField.new(name, doc_values)
  body[:fields] = not_analyzed_string.build
  body[:fields][:analyzed] = { type: :string }
  body
end

#typeObject



14
15
16
# File 'lib/elasticated/mapping/fields/analyzed_string_field.rb', line 14

def type
  :multi_field
end