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 class
DocumentMapper.Builder
Nested 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 ParsedDocument
createDeleteTombstoneDoc(java.lang.String index, java.lang.String type, java.lang.String id)
ParsedDocument
createNoopTombstoneDoc(java.lang.String index, java.lang.String reason)
ObjectMapper
findNestedObjectMapper(int nestedDocId, SearchContext sc, org.apache.lucene.index.LeafReaderContext context)
Returns the best nestedObjectMapper
instances that is in the scope of the specified nested docId.boolean
hasNestedObjects()
IdFieldMapper
idFieldMapper()
IndexFieldMapper
IndexFieldMapper()
IndexFieldMapper
indexMapper()
DocumentFieldMappers
mappers()
Mapping
mapping()
CompressedXContent
mappingSource()
DocumentMapper
merge(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()
ParsedDocument
parse(SourceToParse source)
RootObjectMapper
root()
RoutingFieldMapper
routingFieldMapper()
SourceFieldMapper
sourceMapper()
java.lang.String
toString()
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
java.lang.String
type()
org.apache.lucene.search.Query
typeFilter(QueryShardContext context)
TypeFieldMapper
typeMapper()
Text
typeText()
DocumentMapper
updateFieldType(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 nestedObjectMapper
instances 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:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-