Package org.elasticsearch.index.mapper
Class Mapper
- java.lang.Object
-
- org.elasticsearch.index.mapper.Mapper
-
- All Implemented Interfaces:
Iterable<Mapper>,ToXContent,ToXContentFragment
- Direct Known Subclasses:
FieldAliasMapper,FieldMapper,ObjectMapper
public abstract class Mapper extends Object implements ToXContentFragment, Iterable<Mapper>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapper.Builder<T extends Mapper.Builder,Y extends Mapper>static classMapper.BuilderContextstatic interfaceMapper.TypeParser-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Mappermerge(Mapper mergeWith)Return the merge ofmergeWithinto this.abstract Stringname()Returns the canonical name which uniquely identifies the mapper against other mappers in a type.StringsimpleName()Returns the simple name, which identifies this mapper against other mappers at the same level in the mappers hierarchy TODO: make this protected once Mapper and FieldMapper are merged togetherabstract StringtypeName()Returns a name representing the type of this mapper.abstract MapperupdateFieldType(Map<String,MappedFieldType> fullNameToFieldType)Update the field type of this mapper.-
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, iterator, spliterator
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
Mapper
public Mapper(String simpleName)
-
-
Method Detail
-
simpleName
public final String simpleName()
Returns the simple name, which identifies this mapper against other mappers at the same level in the mappers hierarchy TODO: make this protected once Mapper and FieldMapper are merged together
-
name
public abstract String name()
Returns the canonical name which uniquely identifies the mapper against other mappers in a type.
-
typeName
public abstract String typeName()
Returns a name representing the type of this mapper.
-
merge
public abstract Mapper merge(Mapper mergeWith)
Return the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified.
-
updateFieldType
public abstract Mapper updateFieldType(Map<String,MappedFieldType> fullNameToFieldType)
Update the field type of this mapper. This is necessary because some mapping updates can modify mappings across several types. This method must return a copy of the mapper so that the current mapper is not modified.
-
-