Class VersionsAndSeqNoResolver


  • public final class VersionsAndSeqNoResolver
    extends java.lang.Object
    Utility class to resolve the Lucene doc ID, version, seqNo and primaryTerms for a given uid.
    • Method Detail

      • loadDocIdAndVersion

        public static VersionsAndSeqNoResolver.DocIdAndVersion loadDocIdAndVersion​(org.apache.lucene.index.IndexReader reader,
                                                                                   org.apache.lucene.index.Term term)
                                                                            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
        Load the internal doc ID and sequence number for the uid from the reader, returning
        • null if the uid wasn't found,
        • a doc ID and the associated seqNo otherwise
        Throws:
        java.io.IOException
      • loadVersion

        public static long loadVersion​(org.apache.lucene.index.IndexReader reader,
                                       org.apache.lucene.index.Term term)
                                throws java.io.IOException
        Load the version for the uid from the reader, returning
        • Versions.NOT_FOUND if no matching doc exists,
        • the version associated with the provided uid otherwise
        Throws:
        java.io.IOException