Class: ElasticGraph::SchemaDefinition::Indexing::FieldType::Scalar Private
- Inherits:
-
Data
- Object
- Data
- ElasticGraph::SchemaDefinition::Indexing::FieldType::Scalar
- Defined in:
- elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb,
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 JSON schema and mapping of a SchemaElements::ScalarType.
Instance Attribute Summary collapse
-
#scalar_type ⇒ SchemaElements::ScalarType
readonly
The scalar type.
Instance Method Summary collapse
-
#format_field_json_schema_customizations(customizations) ⇒ Hash<String, ::Object>
private
Formatted customizations.
-
#json_schema_field_metadata_by_field_name ⇒ Hash<String, ::Object>
private
Additional ElasticGraph metadata to put in the JSON schema for this scalar type.
-
#to_json_schema ⇒ Hash<String, ::Object>
private
The JSON schema for this scalar type.
-
#to_mapping ⇒ Hash<String, ::Object>
private
The datastore mapping for this scalar type.
Instance Attribute Details
#scalar_type ⇒ SchemaElements::ScalarType (readonly)
Returns the scalar type.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb', line 24 class Scalar < ::Data # @return [Hash<String, ::Object>] the datastore mapping for this scalar type. def to_mapping Support::HashUtil.stringify_keys(scalar_type.) end # @return [Hash<String, ::Object>] the JSON schema for this scalar type. def to_json_schema Support::HashUtil.stringify_keys(scalar_type.) end # @return [Hash<String, ::Object>] additional ElasticGraph metadata to put in the JSON schema for this scalar type. def {} end # @param customizations [Hash<String, ::Object>] JSON schema customizations # @return [Hash<String, ::Object>] formatted customizations. def format_field_json_schema_customizations(customizations) customizations end # @dynamic initialize, scalar_type end |
Instance Method Details
#format_field_json_schema_customizations(customizations) ⇒ Hash<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 formatted customizations.
42 43 44 |
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb', line 42 def format_field_json_schema_customizations(customizations) customizations end |
#json_schema_field_metadata_by_field_name ⇒ Hash<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 additional ElasticGraph metadata to put in the JSON schema for this scalar type.
36 37 38 |
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb', line 36 def {} end |
#to_json_schema ⇒ Hash<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 JSON schema for this scalar type.
31 32 33 |
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb', line 31 def to_json_schema Support::HashUtil.stringify_keys(scalar_type.) end |
#to_mapping ⇒ Hash<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.
26 27 28 |
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field_type/scalar.rb', line 26 def to_mapping Support::HashUtil.stringify_keys(scalar_type.) end |