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 class
MappingMetaData.Routing
-
Nested 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 boolean
equals(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.int
hashCode()
boolean
hasParentField()
static Diff<MappingMetaData>
readDiffFrom(StreamInput in)
MappingMetaData.Routing
routing()
CompressedXContent
source()
java.util.Map<java.lang.String,java.lang.Object>
sourceAsMap()
Converts the serialized compressed form of the mappings into a parsed map.java.lang.String
type()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.-
Methods inherited from class org.elasticsearch.cluster.AbstractDiffable
diff, get, readDiffFrom
-
-
-
-
Constructor Detail
-
MappingMetaData
public MappingMetaData(DocumentMapper docMapper)
-
MappingMetaData
public MappingMetaData(CompressedXContent mapping) throws java.io.IOException
- Throws:
java.io.IOException
-
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
public MappingMetaData(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
type
public java.lang.String type()
-
source
public CompressedXContent source()
-
hasParentField
public boolean hasParentField()
-
sourceAsMap
public java.util.Map<java.lang.String,java.lang.Object> sourceAsMap() throws ElasticsearchParseException
Converts 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 ElasticsearchParseException
Converts the serialized compressed form of the mappings into a parsed map.- Throws:
ElasticsearchParseException
-
routing
public MappingMetaData.Routing routing()
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
readDiffFrom
public static Diff<MappingMetaData> readDiffFrom(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-