Class FieldAliasMapper

  • All Implemented Interfaces:
    java.lang.Iterable<Mapper>, ToXContent, 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.
    • Constructor Detail

      • FieldAliasMapper

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

      • 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 the type of this mapper.
        Specified by:
        typeName in class Mapper
      • path

        public java.lang.String path()
      • merge

        public Mapper merge​(Mapper mergeWith,
                            boolean updateAllTypes)
        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
      • updateFieldType

        public Mapper updateFieldType​(java.util.Map<java.lang.String,​MappedFieldType> fullNameToFieldType)
        Note: this method is a no-op because field aliases cannot be specified on indexes with more than one type.
        Specified by:
        updateFieldType in class Mapper
      • iterator

        public java.util.Iterator<Mapper> iterator()