Class Lucene41PostingsReader
java.lang.Object
org.apache.lucene.codecs.PostingsReaderBase
org.apache.lucene.codecs.lucene41.Lucene41PostingsReader
- All Implemented Interfaces:
Closeable,AutoCloseable
Concrete class that reads docId(maybe frq,pos,offset,payloads) list
with postings format.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLucene41PostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext ioContext, String segmentSuffix) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddecodeTerm(long[] longs, DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) Actually decode metadata for next termdocs(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsEnum reuse, int flags) Must fully consume state, since after this call that TermState may be reused.docsAndPositions(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsAndPositionsEnum reuse, int flags) Must fully consume state, since after this call that TermState may be reused.voidinit(IndexInput termsIn) Performs any initialization, such as reading and verifying the header from the provided terms dictionaryIndexInput.Return a newly created empty TermStatelongReturns approximate RAM bytes used
-
Constructor Details
-
Lucene41PostingsReader
public Lucene41PostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext ioContext, String segmentSuffix) throws IOException 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
-
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(long[] longs, 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:
-
docs
public DocsEnum docs(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsEnum reuse, int flags) throws IOException Description copied from class:PostingsReaderBaseMust fully consume state, since after this call that TermState may be reused.- Specified by:
docsin classPostingsReaderBase- Throws:
IOException
-
docsAndPositions
public DocsAndPositionsEnum docsAndPositions(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsAndPositionsEnum reuse, int flags) throws IOException Description copied from class:PostingsReaderBaseMust fully consume state, since after this call that TermState may be reused.- Specified by:
docsAndPositionsin classPostingsReaderBase- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()Description copied from class:PostingsReaderBaseReturns approximate RAM bytes used- Specified by:
ramBytesUsedin classPostingsReaderBase
-