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 routing, List<LuceneDocument> documents, BytesReference source, XContentType xContentType, Mapping dynamicMappingsUpdate, long normalizedSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDynamicMappingsUpdate(Mapping update) static ParsedDocumentdeleteTombstone(SeqNoFieldMapper.SeqNoIndexOptions seqNoIndexOptions, 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.longid()static ParsedDocumentnoopTombstone(SeqNoFieldMapper.SeqNoIndexOptions seqNoIndexOptions, String reason) Create a no-op tombstone documentrootDoc()routing()voidsetSource(BytesReference source, XContentType xContentType) source()toString()voidupdateSeqID(long seqNo, long primaryTerm) Update the values of the_seq_noandprimary_termfields to the specified value.org.apache.lucene.document.Fieldversion()
-
Constructor Details
-
ParsedDocument
public ParsedDocument(org.apache.lucene.document.Field version, SeqNoFieldMapper.SequenceIDFields seqID, String id, String routing, List<LuceneDocument> documents, BytesReference source, XContentType xContentType, Mapping dynamicMappingsUpdate, long normalizedSize)
-
-
Method Details
-
noopTombstone
public static ParsedDocument noopTombstone(SeqNoFieldMapper.SeqNoIndexOptions seqNoIndexOptions, String reason) Create a no-op tombstone document- Parameters:
reason- the reason for the no-op
-
deleteTombstone
public static ParsedDocument deleteTombstone(SeqNoFieldMapper.SeqNoIndexOptions seqNoIndexOptions, String id) 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
-
version
public org.apache.lucene.document.Field version() -
updateSeqID
public void updateSeqID(long seqNo, long primaryTerm) Update the values of the_seq_noandprimary_termfields to the specified value. Called in the engine long after parsing. -
routing
-
rootDoc
-
docs
-
source
-
getXContentType
-
setSource
-
dynamicMappingsUpdate
Return dynamic updates to mappings ornullif there were no updates to the mappings. -
addDynamicMappingsUpdate
-
toString
-
documentDescription
-
getNormalizedSize
public long getNormalizedSize()
-