Module org.apache.lucene.codecs
Class BlockTreeOrdsPostingsFormat
java.lang.Object
org.apache.lucene.codecs.PostingsFormat
org.apache.lucene.codecs.blocktreeords.BlockTreeOrdsPostingsFormat
- All Implemented Interfaces:
NamedSPILoader.NamedSPI
Uses
OrdsBlockTreeTermsWriter with Lucene99PostingsWriter.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFixed packed block size, number of integers encoded in a single packed block.private final intprivate final intFields inherited from class org.apache.lucene.codecs.PostingsFormat
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionCreatesLucene41PostingsFormatwith default settings.BlockTreeOrdsPostingsFormat(int minTermBlockSize, int maxTermBlockSize) CreatesLucene41PostingsFormatwith custom values forminBlockSizeandmaxBlockSizepassed to block terms dictionary. -
Method Summary
Modifier and TypeMethodDescriptionfieldsConsumer(SegmentWriteState state) Writes a new segmentfieldsProducer(SegmentReadState state) Reads a segment.toString()Methods inherited from class org.apache.lucene.codecs.PostingsFormat
availablePostingsFormats, forName, getName, reloadPostingsFormats
-
Field Details
-
minTermBlockSize
private final int minTermBlockSize -
maxTermBlockSize
private final int maxTermBlockSize -
BLOCK_SIZE
public static final int BLOCK_SIZEFixed packed block size, number of integers encoded in a single packed block.- See Also:
-
-
Constructor Details
-
BlockTreeOrdsPostingsFormat
public BlockTreeOrdsPostingsFormat()CreatesLucene41PostingsFormatwith default settings. -
BlockTreeOrdsPostingsFormat
public BlockTreeOrdsPostingsFormat(int minTermBlockSize, int maxTermBlockSize) CreatesLucene41PostingsFormatwith custom values forminBlockSizeandmaxBlockSizepassed to block terms dictionary.- See Also:
-
-
Method Details
-
toString
- Overrides:
toStringin classPostingsFormat
-
fieldsConsumer
Description copied from class:PostingsFormatWrites a new segment- Specified by:
fieldsConsumerin classPostingsFormat- Throws:
IOException
-
fieldsProducer
Description copied from class:PostingsFormatReads a segment. NOTE: by the time this call returns, it must hold open any files it will need to use; else, those files may be deleted. Additionally, required files may be deleted during the execution of this call before there is a chance to open them. Under these circumstances an IOException should be thrown by the implementation. IOExceptions are expected and will automatically cause a retry of the segment opening logic with the newly revised segments.- Specified by:
fieldsProducerin classPostingsFormat- Throws:
IOException
-