Class PerThreadPKLookup


  • public class PerThreadPKLookup
    extends Object
    Utility class to do efficient primary-key (only 1 doc contains the given term) lookups by segment, re-using the enums. This class is not thread safe, so it is the caller's job to create and use one instance of this per thread. Do not use this if a term may appear in more than one document! It will only return the first one it finds.
    • Field Detail

      • termsEnums

        protected final TermsEnum[] termsEnums
      • postingsEnums

        protected final PostingsEnum[] postingsEnums
      • liveDocs

        protected final Bits[] liveDocs
      • docBases

        protected final int[] docBases
      • numSegs

        protected final int numSegs
      • hasDeletions

        protected final boolean hasDeletions