Class: ElasticGraph::SchemaDefinition::Indexing::FieldType::Enum Private

Inherits:
Object
  • Object
show all
Defined in:
elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/enum.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::EnumType.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#enum_value_namesArray<String> (readonly)

Returns list of names of values in this enum type.

Returns:

  • (Array<String>)

    list of names of values in this enum type.



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

class Enum < ::Data.define(:enum_value_names)
  # @return [Hash<String, ::Object>] the datastore mapping for this enum type.
  def to_mapping
    {"type" => "keyword"}
  end

  # @dynamic initialize, enum_value_names
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 enum type.

Returns:

  • (Hash<String, ::Object>)

    the datastore mapping for this enum type.



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

def to_mapping
  {"type" => "keyword"}
end