Class Lucene84PostingsReader
java.lang.Object
org.apache.lucene.codecs.PostingsReaderBase
org.apache.lucene.codecs.lucene84.Lucene84PostingsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Accountable
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) final class(package private) final class(package private) final class(package private) final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate final IndexInputprivate final IndexInputprivate final IndexInputprivate final intFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks consistency of this reader.voidclose()voiddecodeTerm(DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) Actually decode metadata for next term(package private) static intfindFirstGreater(long[] buffer, int target, int from) impacts(FieldInfo fieldInfo, BlockTermState state, int flags) Return aImpactsEnumthat computes impacts withscorer.voidinit(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.(package private) static voidprefixSum(long[] buffer, int count, long base) longReturn the memory usage of this object in bytes.(package private) static voidreadVIntBlock(IndexInput docIn, long[] docBuffer, long[] freqBuffer, int num, boolean indexHasFreq) Read values that have been written using variable-length encoding instead of bit-packing.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
BASE_RAM_BYTES_USED
private static final long BASE_RAM_BYTES_USED -
docIn
-
posIn
-
payIn
-
version
private final int version
-
-
Constructor Details
-
Lucene84PostingsReader
Sole constructor.- Throws:
IOException
-
-
Method Details
-
init
Description copied from class:PostingsReaderBasePerforms any initialization, such as reading and verifying the header from the provided terms dictionaryIndexInput.- Specified by:
initin classPostingsReaderBase- Throws:
IOException
-
readVIntBlock
static void readVIntBlock(IndexInput docIn, long[] docBuffer, long[] freqBuffer, int num, boolean indexHasFreq) throws IOException Read values that have been written using variable-length encoding instead of bit-packing.- Throws:
IOException
-
prefixSum
static void prefixSum(long[] buffer, int count, long base) -
findFirstGreater
static int findFirstGreater(long[] buffer, int target, int from) -
newTermState
Description copied from class:PostingsReaderBaseReturn a newly created empty TermState- Specified by:
newTermStatein classPostingsReaderBase
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classPostingsReaderBase- Throws:
IOException
-
decodeTerm
public void decodeTerm(DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) throws IOException Description copied from class:PostingsReaderBaseActually decode metadata for next term- Specified by:
decodeTermin classPostingsReaderBase- Throws:
IOException- See Also:
-
postings
public PostingsEnum postings(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags) throws IOException Description copied from class:PostingsReaderBaseMust fully consume state, since after this call that TermState may be reused.- Specified by:
postingsin classPostingsReaderBase- Throws:
IOException
-
impacts
Description copied from class:PostingsReaderBaseReturn aImpactsEnumthat computes impacts withscorer.- Specified by:
impactsin classPostingsReaderBase- Throws:
IOException- See Also:
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal. -
checkIntegrity
Description copied from class:PostingsReaderBaseChecks 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:
checkIntegrityin classPostingsReaderBase- Throws:
IOException
-
toString
-