Class Lucene41PostingsReader
- java.lang.Object
 - 
- org.apache.lucene.codecs.PostingsReaderBase
 - 
- org.apache.lucene.codecs.lucene41.Lucene41PostingsReader
 
 
 
- 
- All Implemented Interfaces:
 java.io.Closeable,java.lang.AutoCloseable
public final class Lucene41PostingsReader extends PostingsReaderBase
Concrete class that reads docId(maybe frq,pos,offset,payloads) list with postings format.- See Also:
 for details
 
- 
- 
Constructor Summary
Constructors Constructor Description Lucene41PostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext ioContext, java.lang.String segmentSuffix)Sole constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddecodeTerm(long[] longs, DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute)Actually decode metadata for next termDocsEnumdocs(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsEnum reuse, int flags)Must fully consume state, since after this call that TermState may be reused.DocsAndPositionsEnumdocsAndPositions(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.BlockTermStatenewTermState()Return a newly created empty TermStatelongramBytesUsed()Returns approximate RAM bytes used 
 - 
 
- 
- 
Constructor Detail
- 
Lucene41PostingsReader
public Lucene41PostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext ioContext, java.lang.String segmentSuffix) throws java.io.IOException
Sole constructor.- Throws:
 java.io.IOException
 
 - 
 
- 
Method Detail
- 
init
public void init(IndexInput termsIn) throws java.io.IOException
Description copied from class:PostingsReaderBasePerforms any initialization, such as reading and verifying the header from the provided terms dictionaryIndexInput.- Specified by:
 initin classPostingsReaderBase- Throws:
 java.io.IOException
 
- 
newTermState
public BlockTermState newTermState()
Description copied from class:PostingsReaderBaseReturn a newly created empty TermState- Specified by:
 newTermStatein classPostingsReaderBase
 
- 
close
public void close() throws java.io.IOException- Specified by:
 closein interfacejava.lang.AutoCloseable- Specified by:
 closein interfacejava.io.Closeable- Specified by:
 closein classPostingsReaderBase- Throws:
 java.io.IOException
 
- 
decodeTerm
public void decodeTerm(long[] longs, DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) throws java.io.IOExceptionDescription copied from class:PostingsReaderBaseActually decode metadata for next term- Specified by:
 decodeTermin classPostingsReaderBase- Throws:
 java.io.IOException- See Also:
 PostingsWriterBase.encodeTerm(long[], org.apache.lucene.store.DataOutput, org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.BlockTermState, boolean)
 
- 
docs
public DocsEnum docs(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsEnum reuse, int flags) throws java.io.IOException
Description copied from class:PostingsReaderBaseMust fully consume state, since after this call that TermState may be reused.- Specified by:
 docsin classPostingsReaderBase- Throws:
 java.io.IOException
 
- 
docsAndPositions
public DocsAndPositionsEnum docsAndPositions(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsAndPositionsEnum reuse, int flags) throws java.io.IOException
Description copied from class:PostingsReaderBaseMust fully consume state, since after this call that TermState may be reused.- Specified by:
 docsAndPositionsin classPostingsReaderBase- Throws:
 java.io.IOException
 
- 
ramBytesUsed
public long ramBytesUsed()
Description copied from class:PostingsReaderBaseReturns approximate RAM bytes used- Specified by:
 ramBytesUsedin classPostingsReaderBase
 
 - 
 
 -