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.
  • Constructor Details

    • MappingMetadata

      public MappingMetadata​(DocumentMapper docMapper)
    • MappingMetadata

      public MappingMetadata​(CompressedXContent mapping)
    • 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 Details

    • type

      public java.lang.String type()
    • source

      public CompressedXContent source()
    • 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 class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • readDiffFrom

      public static Diff<MappingMetadata> readDiffFrom​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException