Class MappingMetadata
java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<MappingMetadata>
org.elasticsearch.cluster.metadata.MappingMetadata
- All Implemented Interfaces:
Diffable<MappingMetadata>,Writeable
public class MappingMetadata extends AbstractDiffable<MappingMetadata>
Mapping configuration for a type.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMappingMetadata.RoutingNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
Constructors Constructor Description MappingMetadata(java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> mapping)MappingMetadata(CompressedXContent mapping)MappingMetadata(StreamInput in)MappingMetadata(DocumentMapper docMapper) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Map<java.lang.String,java.lang.Object>getSourceAsMap()Converts the serialized compressed form of the mappings into a parsed map.inthashCode()static Diff<MappingMetadata>readDiffFrom(StreamInput in)MappingMetadata.Routingrouting()CompressedXContentsource()java.util.Map<java.lang.String,java.lang.Object>sourceAsMap()Converts the serialized compressed form of the mappings into a parsed map.java.lang.Stringtype()voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Constructor Details
-
MappingMetadata
-
MappingMetadata
-
MappingMetadata
public MappingMetadata(java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> mapping) throws java.io.IOException- Throws:
java.io.IOException
-
MappingMetadata
- Throws:
java.io.IOException
-
-
Method Details
-
type
public java.lang.String type() -
source
-
sourceAsMap
public java.util.Map<java.lang.String,java.lang.Object> sourceAsMap() throws ElasticsearchParseExceptionConverts the serialized compressed form of the mappings into a parsed map.- Throws:
ElasticsearchParseException
-
getSourceAsMap
public java.util.Map<java.lang.String,java.lang.Object> getSourceAsMap() throws ElasticsearchParseExceptionConverts the serialized compressed form of the mappings into a parsed map.- Throws:
ElasticsearchParseException
-
routing
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
readDiffFrom
- Throws:
java.io.IOException
-