java.lang.Object
org.elasticsearch.index.mapper.ParsedDocument
The result of parsing a document.
-
Constructor Summary
ConstructorDescriptionParsedDocument
(org.apache.lucene.document.Field version, SeqNoFieldMapper.SequenceIDFields seqID, String id, String routing, List<LuceneDocument> documents, BytesReference source, XContentType xContentType, Mapping dynamicMappingsUpdate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDynamicMappingsUpdate
(Mapping update) static ParsedDocument
Create a delete tombstone document, which will be used in soft-update methods.docs()
Return dynamic updates to mappings ornull
if there were no updates to the mappings.id()
static ParsedDocument
noopTombstone
(String reason) Create a no-op tombstone documentrootDoc()
routing()
void
setSource
(BytesReference source, XContentType xContentType) source()
toString()
void
updateSeqID
(long seqNo, long primaryTerm) Update the values of the_seq_no
andprimary_term
fields to the specified value.org.apache.lucene.document.Field
version()
-
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)
-
-
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
-
version
public org.apache.lucene.document.Field version() -
updateSeqID
public void updateSeqID(long seqNo, long primaryTerm) Update the values of the_seq_no
andprimary_term
fields to the specified value. Called in the engine long after parsing. -
routing
-
rootDoc
-
docs
-
source
-
getXContentType
-
setSource
-
dynamicMappingsUpdate
Return dynamic updates to mappings ornull
if there were no updates to the mappings. -
addDynamicMappingsUpdate
-
toString
-
documentDescription
-