Module org.apache.lucene.core
Class Lucene101PostingsReader
java.lang.Object
org.apache.lucene.codecs.PostingsReaderBase
org.apache.lucene.codecs.lucene101.Lucene101PostingsReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
Concrete class that reads docId(maybe frq,pos,offset,payloads) list with postings format.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IndexInput
private final int
private final int
private final int
private final int
private final IndexInput
private final IndexInput
(package private) static final VectorizationProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks consistency of this reader.void
close()
void
decodeTerm
(DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) Actually decode metadata for next termimpacts
(FieldInfo fieldInfo, BlockTermState state, int flags) Return aImpactsEnum
that computes impacts withscorer
.void
init
(IndexInput termsIn, SegmentReadState state) Performs any initialization, such as reading and verifying the header from the provided terms dictionaryIndexInput
.Return a newly created empty TermStatepostings
(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags) Must fully consume state, since after this call that TermState may be reused.private static void
(package private) static void
prefixSum
(int[] buffer, int count, long base) (package private) static Lucene101PostingsReader.MutableImpactList
(package private) static int
readVInt15
(DataInput in) (package private) static long
readVLong15
(DataInput in) private static int
sumOverRange
(int[] arr, int start, int end) toString()
-
Field Details
-
VECTORIZATION_PROVIDER
-
DUMMY_IMPACTS
-
docIn
-
posIn
-
payIn
-
maxNumImpactsAtLevel0
private final int maxNumImpactsAtLevel0 -
maxImpactNumBytesAtLevel0
private final int maxImpactNumBytesAtLevel0 -
maxNumImpactsAtLevel1
private final int maxNumImpactsAtLevel1 -
maxImpactNumBytesAtLevel1
private final int maxImpactNumBytesAtLevel1
-
-
Constructor Details
-
Lucene101PostingsReader
Sole constructor.- Throws:
IOException
-
-
Method Details
-
init
Description copied from class:PostingsReaderBase
Performs any initialization, such as reading and verifying the header from the provided terms dictionaryIndexInput
.- Specified by:
init
in classPostingsReaderBase
- Throws:
IOException
-
prefixSum
static void prefixSum(int[] buffer, int count, long base) -
newTermState
Description copied from class:PostingsReaderBase
Return a newly created empty TermState- Specified by:
newTermState
in classPostingsReaderBase
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classPostingsReaderBase
- Throws:
IOException
-
decodeTerm
public void decodeTerm(DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) throws IOException Description copied from class:PostingsReaderBase
Actually decode metadata for next term- Specified by:
decodeTerm
in classPostingsReaderBase
- Throws:
IOException
- See Also:
-
postings
public PostingsEnum postings(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags) throws IOException Description copied from class:PostingsReaderBase
Must fully consume state, since after this call that TermState may be reused.- Specified by:
postings
in classPostingsReaderBase
- Throws:
IOException
-
impacts
Description copied from class:PostingsReaderBase
Return aImpactsEnum
that computes impacts withscorer
.- Specified by:
impacts
in classPostingsReaderBase
- Throws:
IOException
- See Also:
-
sumOverRange
private static int sumOverRange(int[] arr, int start, int end) -
readVInt15
- Throws:
IOException
- See Also:
-
readVLong15
- Throws:
IOException
- See Also:
-
prefetchPostings
private static void prefetchPostings(IndexInput docIn, Lucene101PostingsFormat.IntBlockTermState state) throws IOException - Throws:
IOException
-
readImpacts
static Lucene101PostingsReader.MutableImpactList readImpacts(ByteArrayDataInput in, Lucene101PostingsReader.MutableImpactList reuse) -
checkIntegrity
Description copied from class:PostingsReaderBase
Checks consistency of this reader.Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
- Specified by:
checkIntegrity
in classPostingsReaderBase
- Throws:
IOException
-
toString
-