Class Mapper

java.lang.Object
org.elasticsearch.index.mapper.Mapper
All Implemented Interfaces:
Iterable<Mapper>, ToXContent, ToXContentFragment
Direct Known Subclasses:
FieldAliasMapper, FieldMapper, ObjectMapper

public abstract class Mapper extends Object implements ToXContentFragment, Iterable<Mapper>
  • Constructor Details

    • Mapper

      public Mapper(String simpleName)
  • Method Details

    • simpleName

      public final String simpleName()
      Returns the simple name, which identifies this mapper against other mappers at the same level in the mappers hierarchy TODO: make this protected once Mapper and FieldMapper are merged together
    • name

      public abstract String name()
      Returns the canonical name which uniquely identifies the mapper against other mappers in a type.
    • typeName

      public abstract String typeName()
      Returns a name representing the type of this mapper.
    • merge

      public abstract Mapper merge(Mapper mergeWith)
      Return the merge of mergeWith into this. Both this and mergeWith will be left unmodified.
    • validate

      public abstract void validate(MappingLookup mappers)
      Validate any cross-field references made by this mapper
      Parameters:
      mappers - a MappingLookup that can produce references to other mappers