Class: ElasticGraph::SchemaDefinition::Indexing::JSONSchemaFieldMetadata Private

Inherits:
Data
  • Object
show all
Defined in:
elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb,
elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.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.

Metadata about an ElasticGraph field that needs to be stored in our versioned JSON schemas alongside the JSON schema fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#name_in_indexString (readonly)

Returns name of the field in the index.

Returns:

  • (String)

    name of the field in the index



24
25
26
27
28
29
30
31
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb', line 24

class JSONSchemaFieldMetadata < ::Data
  # @return [Hash<String, String>] hash form of the metadata that can be dumped in JSON schema
  def to_dumpable_hash
    {"type" => type, "nameInIndex" => name_in_index}
  end

  # @dynamic initialize, type, name_in_index
end

#typeString (readonly)

Returns name of the ElasticGraph type for this field.

Returns:

  • (String)

    name of the ElasticGraph type for this field



24
25
26
27
28
29
30
31
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb', line 24

class JSONSchemaFieldMetadata < ::Data
  # @return [Hash<String, String>] hash form of the metadata that can be dumped in JSON schema
  def to_dumpable_hash
    {"type" => type, "nameInIndex" => name_in_index}
  end

  # @dynamic initialize, type, name_in_index
end

Instance Method Details

#to_dumpable_hashHash<String, String>

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 hash form of the metadata that can be dumped in JSON schema.

Returns:

  • (Hash<String, String>)

    hash form of the metadata that can be dumped in JSON schema



26
27
28
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb', line 26

def to_dumpable_hash
  {"type" => type, "nameInIndex" => name_in_index}
end