public interface VariableQuantumIndexWriterAn index writer supporting variable quanta.
This interface provides an additional
newInvertedList(long, double, long, long)method that accepts additional information. That information is used to compute the correct quantum size for a specific list. This approach makes it possible to specify a target fraction of the index that will be used to store skipping information.
Modifier and Type Method Description
newInvertedList(long predictedFrequency, double skipFraction, long predictedSize, long predictedPositionsSize)Starts a new inverted list.
long newInvertedList(long predictedFrequency, double skipFraction, long predictedSize, long predictedPositionsSize) throws IOExceptionStarts a new inverted list. The previous inverted list, if any, is actually written to the underlying bit stream.
This method provides additional information that will be used to compute the correct quantum for the skip structure of the inverted list.
predictedFrequency- the predicted frequency of the inverted list; this might just be an approximation.
skipFraction- the fraction of the inverted list that will be dedicated to skipping structures.
predictedSize- the predicted size of the part of the inverted list that stores terms and counts.
predictedPositionsSize- the predicted size of the part of the inverted list that stores positions.
- the position (in bits) of the underlying bit stream where the new inverted list starts.
IllegalStateException- if too few records were written for the previous inverted list.
- See Also: