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

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



14
15
16
# File 'elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_field_metadata.rb', line 14

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



14
15
16
# File 'elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_field_metadata.rb', line 14

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



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

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