Package org.elasticsearch.index.mapper
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 classFieldAliasMapper.Builderstatic classFieldAliasMapper.Namesstatic classFieldAliasMapper.TypeParserNested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.BuilderContext -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONTENT_TYPE -
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()Mappermerge(Mapper mergeWith)Return the merge ofmergeWithinto this.java.lang.Stringname()Returns the canonical name which uniquely identifies the mapper against other mappers in a type.java.lang.Stringpath()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)java.lang.StringtypeName()Returns a name representing the type of this mapper.voidvalidate(MappingLookup mappers)Validate any cross-field references made by this mapper
-
Field Details
-
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE- See Also:
- Constant Field Values
-
-
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:MapperReturns the canonical name which uniquely identifies the mapper against other mappers in a type. -
typeName
public java.lang.String typeName()Description copied from class:MapperReturns a name representing the type of this mapper. -
path
public java.lang.String path() -
merge
Description copied from class:MapperReturn the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified. -
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
Description copied from class:MapperValidate any cross-field references made by this mapper- Specified by:
validatein classMapper- Parameters:
mappers- aMappingLookupthat can produce references to other mappers
-