Class Mapping

java.lang.Object
org.elasticsearch.index.mapper.Mapping
All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public final class Mapping
extends java.lang.Object
implements org.elasticsearch.common.xcontent.ToXContentFragment
Wrapper around everything that defines a mapping, without references to utility classes like MapperService, ...
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields
    Modifier and Type Field Description
    static Mapping EMPTY  

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor Description
    Mapping​(RootObjectMapper rootObjectMapper, MetadataFieldMapper[] metadataMappers, java.util.Map<java.lang.String,​java.lang.Object> meta)  
  • Method Summary

    Modifier and Type Method Description
    Mapping merge​(Mapping mergeWith, MapperService.MergeReason reason)
    Merges a new mapping into the existing one.
    java.lang.String toString()  
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    java.lang.String type()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment
  • Field Details

    • EMPTY

      public static final Mapping EMPTY
  • Constructor Details

  • Method Details

    • type

      public java.lang.String type()
    • merge

      public Mapping merge​(Mapping mergeWith, MapperService.MergeReason reason)
      Merges a new mapping into the existing one.
      Parameters:
      mergeWith - the new mapping to merge into this one.
      reason - the reason this merge was initiated.
      Returns:
      the resulting merged mapping.
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object