Package org.apache.lucene.util.bkd
Class PointReader
- java.lang.Object
-
- org.apache.lucene.util.bkd.PointReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
HeapPointReader,OfflinePointReader
public abstract class PointReader extends Object implements Closeable
One pass iterator through all points previously written with aPointWriter, abstracting away whether points a read from (offline) disk or simple arrays in heap.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description PointReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intdocID()DocID for this pointvoidmarkOrds(long count, LongBitSet ordBitSet)Iterates through the nextcountords, marking them in the providedordBitSet.abstract booleannext()Returns false once iteration is done, else true.abstract longord()Point ordinalabstract byte[]packedValue()Returns the packed byte[] valuelongsplit(long count, LongBitSet rightTree, PointWriter left, PointWriter right, boolean doClearBits)Splits this reader into left and right partitions
-
-
-
Method Detail
-
next
public abstract boolean next() throws IOExceptionReturns false once iteration is done, else true.- Throws:
IOException
-
packedValue
public abstract byte[] packedValue()
Returns the packed byte[] value
-
ord
public abstract long ord()
Point ordinal
-
docID
public abstract int docID()
DocID for this point
-
markOrds
public void markOrds(long count, LongBitSet ordBitSet) throws IOExceptionIterates through the nextcountords, marking them in the providedordBitSet.- Throws:
IOException
-
split
public long split(long count, LongBitSet rightTree, PointWriter left, PointWriter right, boolean doClearBits) throws IOExceptionSplits this reader into left and right partitions- Throws:
IOException
-
-