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.Builder-
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
-
-
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()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.-
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
-
-
-
-
Constructor Detail
-
DocumentMapper
public DocumentMapper(MapperService mapperService, Mapping mapping)
-
-
Method Detail
-
mapping
public Mapping mapping()
-
type
public java.lang.String type()
-
typeText
public Text typeText()
-
meta
public java.util.Map<java.lang.String,java.lang.Object> meta()
-
mappingSource
public CompressedXContent mappingSource()
-
root
public RootObjectMapper root()
-
metadataMapper
public <T extends MetadataFieldMapper> T metadataMapper(java.lang.Class<T> type)
-
indexMapper
public IndexFieldMapper indexMapper()
-
typeMapper
public TypeFieldMapper typeMapper()
-
sourceMapper
public SourceFieldMapper sourceMapper()
-
idFieldMapper
public IdFieldMapper idFieldMapper()
-
routingFieldMapper
public RoutingFieldMapper routingFieldMapper()
-
IndexFieldMapper
public IndexFieldMapper IndexFieldMapper()
-
typeFilter
public org.apache.lucene.search.Query typeFilter(QueryShardContext context)
-
hasNestedObjects
public boolean hasNestedObjects()
-
mappers
public DocumentFieldMappers mappers()
-
objectMappers
public java.util.Map<java.lang.String,ObjectMapper> objectMappers()
-
parse
public ParsedDocument parse(SourceToParse source) throws MapperParsingException
- 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.IOException
Returns the best nestedObjectMapperinstances that is in the scope of the specified nested docId.- Throws:
java.io.IOException
-
merge
public DocumentMapper merge(Mapping mapping)
-
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
-
-