Class: Elasticated::Mapping::Fields::FieldWithDocValues
- Inherits:
-
StandardField
- Object
- StandardField
- Elasticated::Mapping::Fields::FieldWithDocValues
- Defined in:
- lib/elasticated/mapping/fields/field_with_doc_values.rb
Direct Known Subclasses
AnalyzedStringField, DateField, DoubleField, FloatField, IntegerField, LongField, StringField
Instance Attribute Summary collapse
-
#doc_values ⇒ Object
Returns the value of attribute doc_values.
Attributes inherited from StandardField
Instance Method Summary collapse
- #build_body ⇒ Object
-
#initialize(name, doc_values = true) ⇒ FieldWithDocValues
constructor
A new instance of FieldWithDocValues.
Methods inherited from StandardField
Constructor Details
#initialize(name, doc_values = true) ⇒ FieldWithDocValues
Returns a new instance of FieldWithDocValues.
8 9 10 11 |
# File 'lib/elasticated/mapping/fields/field_with_doc_values.rb', line 8 def initialize(name, doc_values=true) super(name) self.doc_values = doc_values end |
Instance Attribute Details
#doc_values ⇒ Object
Returns the value of attribute doc_values.
6 7 8 |
# File 'lib/elasticated/mapping/fields/field_with_doc_values.rb', line 6 def doc_values @doc_values end |
Instance Method Details
#build_body ⇒ Object
13 14 15 16 17 |
# File 'lib/elasticated/mapping/fields/field_with_doc_values.rb', line 13 def build_body body = super body[:fielddata] = { format: :doc_values } if doc_values body end |