Class FieldAliasMapper

java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.FieldAliasMapper
All Implemented Interfaces:
java.lang.Iterable<Mapper>, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public final class FieldAliasMapper
extends Mapper
A mapper for field aliases. A field alias has no concrete field mappings of its own, but instead points to another field by its path. Once defined, an alias can be used in place of the concrete field name in search requests.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  FieldAliasMapper.Builder  
    static class  FieldAliasMapper.Names  
    static class  FieldAliasMapper.TypeParser  

    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 java.lang.String CONTENT_TYPE  

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

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor Description
    FieldAliasMapper​(java.lang.String simpleName, java.lang.String name, java.lang.String path)  
  • Method Summary

    Modifier and Type Method Description
    java.util.Iterator<Mapper> iterator()  
    Mapper merge​(Mapper mergeWith)
    Return the merge of mergeWith into this.
    java.lang.String name()
    Returns the canonical name which uniquely identifies the mapper against other mappers in a type.
    java.lang.String path()  
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    java.lang.String typeName()
    Returns a name representing the type of this mapper.
    void validate​(MappingLookup mappers)
    Validate any cross-field references made by this mapper

    Methods inherited from class org.elasticsearch.index.mapper.Mapper

    simpleName

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

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

    isFragment
  • Field Details

  • Constructor Details

    • FieldAliasMapper

      public FieldAliasMapper​(java.lang.String simpleName, java.lang.String name, java.lang.String path)
  • Method Details

    • name

      public java.lang.String name()
      Description copied from class: Mapper
      Returns the canonical name which uniquely identifies the mapper against other mappers in a type.
      Specified by:
      name in class Mapper
    • typeName

      public java.lang.String typeName()
      Description copied from class: Mapper
      Returns a name representing the type of this mapper.
      Specified by:
      typeName in class Mapper
    • path

      public java.lang.String path()
    • merge

      public Mapper merge​(Mapper mergeWith)
      Description copied from class: Mapper
      Return the merge of mergeWith into this. Both this and mergeWith will be left unmodified.
      Specified by:
      merge in class Mapper
    • iterator

      public java.util.Iterator<Mapper> iterator()
    • 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
      Throws:
      java.io.IOException
    • validate

      public void validate​(MappingLookup mappers)
      Description copied from class: Mapper
      Validate any cross-field references made by this mapper
      Specified by:
      validate in class Mapper
      Parameters:
      mappers - a MappingLookup that can produce references to other mappers