Class VersionsAndSeqNoResolver
- java.lang.Object
-
- org.elasticsearch.common.lucene.uid.VersionsAndSeqNoResolver
-
public final class VersionsAndSeqNoResolver extends java.lang.ObjectUtility class to resolve the Lucene doc ID, version, seqNo and primaryTerms for a given uid.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVersionsAndSeqNoResolver.DocIdAndSeqNoWraps anLeafReaderContext, a doc ID relative to the context doc base and a seqNo.static classVersionsAndSeqNoResolver.DocIdAndVersionWraps anLeafReaderContext, a doc ID relative to the context doc base and a version.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static VersionsAndSeqNoResolver.DocIdAndSeqNoloadDocIdAndSeqNo(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term)Loads the internal docId and sequence number of the latest copy for a given uid from the provided reader.static VersionsAndSeqNoResolver.DocIdAndVersionloadDocIdAndVersion(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term, boolean loadSeqNo)Load the internal doc ID and version for the uid from the reader, returning null if the uid wasn't found, a doc ID and a version otherwise
-
-
-
Method Detail
-
loadDocIdAndVersion
public static VersionsAndSeqNoResolver.DocIdAndVersion loadDocIdAndVersion(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term, boolean loadSeqNo) throws java.io.IOException
Load the internal doc ID and version for the uid from the reader, returning- null if the uid wasn't found,
- a doc ID and a version otherwise
- Throws:
java.io.IOException
-
loadDocIdAndSeqNo
public static VersionsAndSeqNoResolver.DocIdAndSeqNo loadDocIdAndSeqNo(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term) throws java.io.IOException
Loads the internal docId and sequence number of the latest copy for a given uid from the provided reader. The flagVersionsAndSeqNoResolver.DocIdAndSeqNo.isLiveindicates whether the returned document is live or (soft)deleted. This returnsnullif no such document matching the given term uid.- Throws:
java.io.IOException
-
-