Class VersionsAndSeqNoResolver
java.lang.Object
org.elasticsearch.common.lucene.uid.VersionsAndSeqNoResolver
Utility class to resolve the Lucene doc ID, version, seqNo and primaryTerms for a given uid.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Wraps anLeafReaderContext
, a doc ID relative to the context doc base and a seqNo.static class
Wraps anLeafReaderContext
, a doc ID relative to the context doc base and a version. -
Method Summary
Modifier and TypeMethodDescriptionloadDocIdAndSeqNo
(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.loadDocIdAndVersion
(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 otherwiseloadDocIdAndVersionUncached
(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term, boolean loadSeqNo)
-
Method Details
-
loadDocIdAndVersion
public static VersionsAndSeqNoResolver.DocIdAndVersion loadDocIdAndVersion(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term, boolean loadSeqNo) throws 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:
IOException
-
loadDocIdAndVersionUncached
public static VersionsAndSeqNoResolver.DocIdAndVersion loadDocIdAndVersionUncached(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term, boolean loadSeqNo) throws IOException - Throws:
IOException
-
loadDocIdAndSeqNo
public static VersionsAndSeqNoResolver.DocIdAndSeqNo loadDocIdAndSeqNo(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term) throws IOException Loads the internal docId and sequence number of the latest copy for a given uid from the provided reader. The result is either null or the live and latest version of the given uid.- Throws:
IOException
-