Package org.apache.lucene.tests.index
Class PerThreadPKLookup
java.lang.Object
org.apache.lucene.tests.index.PerThreadPKLookup
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 Summary
Modifier and TypeFieldDescriptionprotected final int[]
protected final boolean
protected final Bits[]
protected final int
protected final PostingsEnum[]
protected final TermsEnum[]
-
Constructor Summary
-
Method Summary
-
Field Details
-
termsEnums
-
postingsEnums
-
liveDocs
-
docBases
protected final int[] docBases -
numSegs
protected final int numSegs -
hasDeletions
protected final boolean hasDeletions
-
-
Constructor Details
-
PerThreadPKLookup
- Throws:
IOException
-
-
Method Details
-
lookup
Returns docID if found, else -1.- Throws:
IOException
-