Package org.elasticsearch.index.mapper
Class FieldAliasMapper
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.FieldAliasMapper
- All Implemented Interfaces:
<Mapper>
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
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
Modifier and TypeClassDescriptionstatic class
static class
static class
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 inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionsimpleName, name, path)
-
Method Summary
Modifier and TypeMethodDescription<Mapper>
iterator()
Return the merge ofmergeWith
into this.name()
Returns the canonical name which uniquely identifies the mapper against other mappers in a type.path()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
typeName()
Returns a name representing the type of this mapper.void
validate(MappingLookup mappers)
Validate any cross-field references made by this mapperMethods inherited from class org.elasticsearch.index.mapper.Mapper
simpleName
Methods inherited from class java.lang.
, , , , , , , , , ,
Methods inherited from interface java.lang.
,
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
CONTENT_TYPE
public static final CONTENT_TYPE- See Also:
- Constant Field Values
-
-
Constructor Details
-
FieldAliasMapper
public FieldAliasMapper( simpleName, name, path)
-
-
Method Details
-
name
public name()Description copied from class:Mapper
Returns the canonical name which uniquely identifies the mapper against other mappers in a type. -
typeName
public typeName()Description copied from class:Mapper
Returns a name representing the type of this mapper. -
path
public path() -
merge
Description copied from class:Mapper
Return the merge ofmergeWith
into this. Boththis
andmergeWith
will 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- Throws:
-
validate
Description copied from class:Mapper
Validate any cross-field references made by this mapper- Specified by:
validate
in classMapper
- Parameters:
mappers
- aMappingLookup
that can produce references to other mappers
-