Class Lucene50PostingsReader
- java.lang.Object
-
- org.apache.lucene.codecs.PostingsReaderBase
-
- org.apache.lucene.backward_codecs.lucene50.Lucene50PostingsReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public final class Lucene50PostingsReader extends PostingsReaderBase
Concrete class that reads docId(maybe frq,pos,offset,payloads) list with postings format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
Lucene50PostingsReader.BlockDocsEnum
(package private) class
Lucene50PostingsReader.BlockImpactsEverythingEnum
(package private) class
Lucene50PostingsReader.BlockImpactsPostingsEnum
(package private) class
Lucene50PostingsReader.EverythingEnum
-
Field Summary
Fields Modifier and Type Field Description private IndexInput
docIn
(package private) ForUtil
forUtil
private IndexInput
payIn
private IndexInput
posIn
private int
version
-
Constructor Summary
Constructors Constructor Description Lucene50PostingsReader(SegmentReadState state)
Sole constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkIntegrity()
Checks consistency of this reader.void
close()
void
decodeTerm(DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute)
Actually decode metadata for next termImpactsEnum
impacts(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
.BlockTermState
newTermState()
Return a newly created empty TermStatePostingsEnum
postings(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags)
Must fully consume state, since after this call that TermState may be reused.(package private) static void
readVIntBlock(IndexInput docIn, int[] docBuffer, int[] freqBuffer, int num, boolean indexHasFreq)
Read values that have been written using variable-length encoding instead of bit-packing.java.lang.String
toString()
-
-
-
Field Detail
-
docIn
private final IndexInput docIn
-
posIn
private final IndexInput posIn
-
payIn
private final IndexInput payIn
-
forUtil
final ForUtil forUtil
-
version
private int version
-
-
Constructor Detail
-
Lucene50PostingsReader
public Lucene50PostingsReader(SegmentReadState state) throws java.io.IOException
Sole constructor.- Throws:
java.io.IOException
-
-
Method Detail
-
init
public void init(IndexInput termsIn, SegmentReadState state) throws java.io.IOException
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:
java.io.IOException
-
readVIntBlock
static void readVIntBlock(IndexInput docIn, int[] docBuffer, int[] freqBuffer, int num, boolean indexHasFreq) throws java.io.IOException
Read values that have been written using variable-length encoding instead of bit-packing.- Throws:
java.io.IOException
-
newTermState
public BlockTermState newTermState()
Description copied from class:PostingsReaderBase
Return a newly created empty TermState- Specified by:
newTermState
in classPostingsReaderBase
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classPostingsReaderBase
- Throws:
java.io.IOException
-
decodeTerm
public void decodeTerm(DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) throws java.io.IOException
Description copied from class:PostingsReaderBase
Actually decode metadata for next term- Specified by:
decodeTerm
in classPostingsReaderBase
- Throws:
java.io.IOException
- See Also:
PostingsWriterBase.encodeTerm(org.apache.lucene.store.DataOutput, org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.BlockTermState, boolean)
-
postings
public PostingsEnum postings(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags) throws java.io.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:
java.io.IOException
-
impacts
public ImpactsEnum impacts(FieldInfo fieldInfo, BlockTermState state, int flags) throws java.io.IOException
Description copied from class:PostingsReaderBase
Return aImpactsEnum
that computes impacts withscorer
.- Specified by:
impacts
in classPostingsReaderBase
- Throws:
java.io.IOException
- See Also:
PostingsReaderBase.postings(FieldInfo, BlockTermState, PostingsEnum, int)
-
checkIntegrity
public void checkIntegrity() throws java.io.IOException
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:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-