java.lang.Object
org.apache.lucene.util.bkd.DocIdsWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private final int[]
private final IntsRef
IntsRef to be used to iterate over the scratch buffer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
readBitSet
(IndexInput in, int count, int[] docIDs) private static void
readBitSet
(IndexInput in, int count, PointValues.IntersectVisitor visitor) private static DocIdSetIterator
readBitSetIterator
(IndexInput in, int count) private static void
readContinuousIds
(IndexInput in, int count, int[] docIDs) private static void
readContinuousIds
(IndexInput in, int count, PointValues.IntersectVisitor visitor) private static void
readDelta16
(IndexInput in, int count, int[] docIDs) private void
readDelta16
(IndexInput in, int count, PointValues.IntersectVisitor visitor) (package private) void
readInts
(IndexInput in, int count, int[] docIDs) Readcount
integers intodocIDs
.(package private) void
readInts
(IndexInput in, int count, PointValues.IntersectVisitor visitor) Readcount
integers and feed the result directly toPointValues.IntersectVisitor.visit(int)
.private static void
readInts24
(IndexInput in, int count, int[] docIDs) private static void
readInts24
(IndexInput in, int count, PointValues.IntersectVisitor visitor) private static void
readInts32
(IndexInput in, int count, int[] docIDs) private void
readInts32
(IndexInput in, int count, PointValues.IntersectVisitor visitor) private static void
readLegacyDeltaVInts
(IndexInput in, int count, int[] docIDs) private static void
readLegacyDeltaVInts
(IndexInput in, int count, PointValues.IntersectVisitor visitor) (package private) void
writeDocIds
(int[] docIds, int start, int count, DataOutput out) private static void
writeIdsAsBitSet
(int[] docIds, int start, int count, DataOutput out)
-
Field Details
-
CONTINUOUS_IDS
private static final byte CONTINUOUS_IDS- See Also:
-
BITSET_IDS
private static final byte BITSET_IDS- See Also:
-
DELTA_BPV_16
private static final byte DELTA_BPV_16- See Also:
-
BPV_24
private static final byte BPV_24- See Also:
-
BPV_32
private static final byte BPV_32- See Also:
-
LEGACY_DELTA_VINT
private static final byte LEGACY_DELTA_VINT- See Also:
-
scratch
private final int[] scratch -
scratchIntsRef
IntsRef to be used to iterate over the scratch buffer. A single instance is reused to avoid re-allocating the object. The ints and length fields need to be reset each use.The main reason for existing is to be able to call the
PointValues.IntersectVisitor.visit(IntsRef)
method rather than thePointValues.IntersectVisitor.visit(int)
method. This seems to make a difference in performance, probably due to fewer virtual calls then happening (once per read call rather than once per doc).
-
-
Constructor Details
-
DocIdsWriter
DocIdsWriter(int maxPointsInLeaf)
-
-
Method Details
-
writeDocIds
- Throws:
IOException
-
writeIdsAsBitSet
private static void writeIdsAsBitSet(int[] docIds, int start, int count, DataOutput out) throws IOException - Throws:
IOException
-
readInts
Readcount
integers intodocIDs
.- Throws:
IOException
-
readBitSetIterator
- Throws:
IOException
-
readContinuousIds
- Throws:
IOException
-
readLegacyDeltaVInts
- Throws:
IOException
-
readBitSet
- Throws:
IOException
-
readDelta16
- Throws:
IOException
-
readInts24
- Throws:
IOException
-
readInts32
- Throws:
IOException
-
readInts
Readcount
integers and feed the result directly toPointValues.IntersectVisitor.visit(int)
.- Throws:
IOException
-
readBitSet
private static void readBitSet(IndexInput in, int count, PointValues.IntersectVisitor visitor) throws IOException - Throws:
IOException
-
readContinuousIds
private static void readContinuousIds(IndexInput in, int count, PointValues.IntersectVisitor visitor) throws IOException - Throws:
IOException
-
readLegacyDeltaVInts
private static void readLegacyDeltaVInts(IndexInput in, int count, PointValues.IntersectVisitor visitor) throws IOException - Throws:
IOException
-
readDelta16
private void readDelta16(IndexInput in, int count, PointValues.IntersectVisitor visitor) throws IOException - Throws:
IOException
-
readInts24
private static void readInts24(IndexInput in, int count, PointValues.IntersectVisitor visitor) throws IOException - Throws:
IOException
-
readInts32
private void readInts32(IndexInput in, int count, PointValues.IntersectVisitor visitor) throws IOException - Throws:
IOException
-