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

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



13
14
15
# File 'lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb', line 13

def name_in_index
  @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



13
14
15
# File 'lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb', line 13

def type
  @type
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 'lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb', line 26

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