Package org.elasticsearch.index.mapper
Class ParsedDocument
java.lang.Object
org.elasticsearch.index.mapper.ParsedDocument
The result of parsing a document.
-
Constructor Summary
ConstructorsConstructorDescriptionParsedDocument(org.apache.lucene.document.Field version, SeqNoFieldMapper.SequenceIDFields seqID, String id, String type, String routing, List<LuceneDocument> documents, BytesReference source, org.elasticsearch.common.xcontent.XContentType xContentType, Mapping dynamicMappingsUpdate) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDynamicMappingsUpdate(Mapping update)static ParsedDocumentdeleteTombstone(String type, String id)Create a delete tombstone document, which will be used in soft-update methods.docs()Return dynamic updates to mappings ornullif there were no updates to the mappings.org.elasticsearch.common.xcontent.XContentTypeid()static ParsedDocumentnoopTombstone(String reason)Create a no-op tombstone documentrootDoc()routing()voidsetSource(BytesReference source, org.elasticsearch.common.xcontent.XContentType xContentType)source()toString()type()voidupdateSeqID(long sequenceNumber, long primaryTerm)org.apache.lucene.document.Fieldversion()
-
Constructor Details
-
ParsedDocument
public ParsedDocument(org.apache.lucene.document.Field version, SeqNoFieldMapper.SequenceIDFields seqID, String id, String type, String routing, List<LuceneDocument> documents, BytesReference source, org.elasticsearch.common.xcontent.XContentType xContentType, Mapping dynamicMappingsUpdate)
-
-
Method Details
-
noopTombstone
Create a no-op tombstone document- Parameters:
reason- the reason for the no-op
-
deleteTombstone
Create a delete tombstone document, which will be used in soft-update methods. The returned document consists only _uid, _seqno, _term and _version fields; other metadata fields are excluded.- Parameters:
id- the id of the deleted document
-
id
-
type
-
version
public org.apache.lucene.document.Field version() -
updateSeqID
public void updateSeqID(long sequenceNumber, long primaryTerm) -
routing
-
rootDoc
-
docs
-
source
-
getXContentType
public org.elasticsearch.common.xcontent.XContentType getXContentType() -
setSource
public void setSource(BytesReference source, org.elasticsearch.common.xcontent.XContentType xContentType) -
dynamicMappingsUpdate
Return dynamic updates to mappings ornullif there were no updates to the mappings. -
addDynamicMappingsUpdate
-
toString
-