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>,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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldAliasMapper.Builderstatic classFieldAliasMapper.Namesstatic classFieldAliasMapper.TypeParser-
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.BuilderContext
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONTENT_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()Mappermerge(Mapper mergeWith, boolean updateAllTypes)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()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)java.lang.StringtypeName()Returns a name representing the the type of this mapper.MapperupdateFieldType(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.-
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 org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 the type of this mapper.
-
path
public java.lang.String path()
-
merge
public Mapper merge(Mapper mergeWith, boolean updateAllTypes)
Description copied from class:MapperReturn the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified.
-
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:
updateFieldTypein classMapper
-
iterator
public java.util.Iterator<Mapper> iterator()
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
-