Class Lucene84PostingsReader
- java.lang.Object
-
- org.apache.lucene.codecs.PostingsReaderBase
-
- org.apache.lucene.codecs.lucene84.Lucene84PostingsReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Accountable
public final class Lucene84PostingsReader extends PostingsReaderBase
Concrete class that reads docId(maybe frq,pos,offset,payloads) list with postings format.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description Lucene84PostingsReader(SegmentReadState state)
Sole constructor.
-
Method Summary
All 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.long
ramBytesUsed()
Return the memory usage of this object in bytes.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Constructor Detail
-
Lucene84PostingsReader
public Lucene84PostingsReader(SegmentReadState state) throws IOException
Sole constructor.- Throws:
IOException
-
-
Method Detail
-
init
public void init(IndexInput termsIn, SegmentReadState state) throws 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:
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 IOException
- 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
-
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
public ImpactsEnum impacts(FieldInfo fieldInfo, BlockTermState state, int flags) throws IOException
Description copied from class:PostingsReaderBase
Return aImpactsEnum
that computes impacts withscorer
.- Specified by:
impacts
in classPostingsReaderBase
- Throws:
IOException
- See Also:
PostingsReaderBase.postings(FieldInfo, BlockTermState, PostingsEnum, int)
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-
checkIntegrity
public void checkIntegrity() throws 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:
IOException
-
-