Class: ElasticGraph::SchemaDefinition::Indexing::FieldType::Scalar Private

Inherits:
Object
  • Object
show all
Defined in:
elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Responsible for the mapping of a SchemaElements::ScalarType.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#scalar_typeSchemaElements::ScalarType (readonly)

Returns the scalar type.

Returns:



21
22
23
24
25
26
27
28
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb', line 21

class Scalar < ::Data.define(:scalar_type)
  # @return [Hash<String, ::Object>] the datastore mapping for this scalar type.
  def to_mapping
    Support::HashUtil.stringify_keys(scalar_type.mapping_options)
  end

  # @dynamic initialize, scalar_type
end

Instance Method Details

#to_mappingHash<String, ::Object>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the datastore mapping for this scalar type.

Returns:

  • (Hash<String, ::Object>)

    the datastore mapping for this scalar type.



23
24
25
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb', line 23

def to_mapping
  Support::HashUtil.stringify_keys(scalar_type.mapping_options)
end