Package org.elasticsearch.index.mapper
Class DocumentMapper
java.lang.Object
org.elasticsearch.index.mapper.DocumentMapper
- All Implemented Interfaces:
ToXContent,ToXContentFragment
public class DocumentMapper extends java.lang.Object implements ToXContentFragment
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDocumentMapper.BuilderNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
-
Constructor Summary
Constructors Constructor Description DocumentMapper(MapperService mapperService, Mapping mapping) -
Method Summary
Modifier and Type Method Description ParsedDocumentcreateDeleteTombstoneDoc(java.lang.String index, java.lang.String type, java.lang.String id)ParsedDocumentcreateNoopTombstoneDoc(java.lang.String index, java.lang.String reason)ObjectMapperfindNestedObjectMapper(int nestedDocId, SearchContext sc, org.apache.lucene.index.LeafReaderContext context)Returns the best nestedObjectMapperinstances that is in the scope of the specified nested docId.booleanhasNestedObjects()IdFieldMapperidFieldMapper()IndexFieldMapperIndexFieldMapper()IndexFieldMapperindexMapper()DocumentFieldMappersmappers()Mappingmapping()CompressedXContentmappingSource()DocumentMappermerge(Mapping mapping)java.util.Map<java.lang.String,java.lang.Object>meta()<T extends MetadataFieldMapper>
TmetadataMapper(java.lang.Class<T> type)java.util.Map<java.lang.String,ObjectMapper>objectMappers()ParsedDocumentparse(SourceToParse source)RootObjectMapperroot()RoutingFieldMapperroutingFieldMapper()SourceFieldMappersourceMapper()java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)java.lang.Stringtype()org.apache.lucene.search.QuerytypeFilter(QueryShardContext context)TypeFieldMappertypeMapper()TexttypeText()DocumentMapperupdateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)Recursively update sub field types.
-
Constructor Details
-
Method Details
-
mapping
-
type
public java.lang.String type() -
typeText
-
meta
public java.util.Map<java.lang.String,java.lang.Object> meta() -
mappingSource
-
root
-
metadataMapper
-
indexMapper
-
typeMapper
-
sourceMapper
-
idFieldMapper
-
routingFieldMapper
-
IndexFieldMapper
-
typeFilter
-
hasNestedObjects
public boolean hasNestedObjects() -
mappers
-
objectMappers
-
parse
- Throws:
MapperParsingException
-
createDeleteTombstoneDoc
public ParsedDocument createDeleteTombstoneDoc(java.lang.String index, java.lang.String type, java.lang.String id) throws MapperParsingException- Throws:
MapperParsingException
-
createNoopTombstoneDoc
public ParsedDocument createNoopTombstoneDoc(java.lang.String index, java.lang.String reason) throws MapperParsingException- Throws:
MapperParsingException
-
findNestedObjectMapper
public ObjectMapper findNestedObjectMapper(int nestedDocId, SearchContext sc, org.apache.lucene.index.LeafReaderContext context) throws java.io.IOExceptionReturns the best nestedObjectMapperinstances that is in the scope of the specified nested docId.- Throws:
java.io.IOException
-
merge
-
updateFieldType
public DocumentMapper updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)Recursively update sub field types. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-