public final class BKDReader extends PointValues
BKDWriter.| Modifier and Type | Class and Description |
|---|---|
protected static class |
BKDReader.BKDReaderDocIDSetIterator
Reusable
DocIdSetIterator to handle low cardinality leaves. |
class |
BKDReader.IndexTree
Used to walk the off-heap index.
|
static class |
BKDReader.IntersectState
Used to track all state for a single call to
intersect(org.apache.lucene.index.PointValues.IntersectVisitor). |
PointValues.IntersectVisitor, PointValues.RelationMAX_DIMENSIONS, MAX_INDEX_DIMENSIONS, MAX_NUM_BYTES| Constructor and Description |
|---|
BKDReader(IndexInput metaIn,
IndexInput indexIn,
IndexInput dataIn)
Caller must pre-seek the provided
IndexInput to the index location that BKDWriter.finish(org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput) returned. |
| Modifier and Type | Method and Description |
|---|---|
long |
estimatePointCount(PointValues.IntersectVisitor visitor)
Estimate the number of points that would be visited by
PointValues.intersect(org.apache.lucene.index.PointValues.IntersectVisitor)
with the given PointValues.IntersectVisitor. |
int |
getBytesPerDimension()
Returns the number of bytes per dimension
|
int |
getDocCount()
Returns the total number of documents that have indexed at least one point.
|
BKDReader.IntersectState |
getIntersectState(PointValues.IntersectVisitor visitor)
Create a new
BKDReader.IntersectState |
byte[] |
getMaxPackedValue()
Returns maximum value for each dimension, packed, or null if
PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String) is 0 |
byte[] |
getMinPackedValue()
Returns minimum value for each dimension, packed, or null if
PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String) is 0 |
int |
getNumDimensions()
Returns how many dimensions are represented in the values
|
int |
getNumIndexDimensions()
Returns how many dimensions are used for the index
|
void |
intersect(PointValues.IntersectVisitor visitor)
Finds all documents and points matching the provided visitor.
|
boolean |
isLeafNode(int nodeID) |
long |
size()
Returns the total number of indexed points across all documents.
|
void |
visitLeafBlockValues(BKDReader.IndexTree index,
BKDReader.IntersectState state)
Visits all docIDs and packed values in a single leaf block
|
estimateDocCount, getDocCount, getMaxPackedValue, getMinPackedValue, sizepublic BKDReader(IndexInput metaIn, IndexInput indexIn, IndexInput dataIn) throws IOException
IndexInput to the index location that BKDWriter.finish(org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput) returned.
BKD tree is always stored off-heap.IOExceptionpublic void intersect(PointValues.IntersectVisitor visitor) throws IOException
PointValuesintersect in class PointValuesIOExceptionpublic long estimatePointCount(PointValues.IntersectVisitor visitor)
PointValuesPointValues.intersect(org.apache.lucene.index.PointValues.IntersectVisitor)
with the given PointValues.IntersectVisitor. This should run many times faster
than PointValues.intersect(IntersectVisitor).estimatePointCount in class PointValuespublic BKDReader.IntersectState getIntersectState(PointValues.IntersectVisitor visitor)
BKDReader.IntersectStatepublic void visitLeafBlockValues(BKDReader.IndexTree index, BKDReader.IntersectState state) throws IOException
IOExceptionpublic byte[] getMinPackedValue()
PointValuesPointValues.size(org.apache.lucene.index.IndexReader, java.lang.String) is 0getMinPackedValue in class PointValuespublic byte[] getMaxPackedValue()
PointValuesPointValues.size(org.apache.lucene.index.IndexReader, java.lang.String) is 0getMaxPackedValue in class PointValuespublic int getNumDimensions()
PointValuesgetNumDimensions in class PointValuespublic int getNumIndexDimensions()
PointValuesgetNumIndexDimensions in class PointValuespublic int getBytesPerDimension()
PointValuesgetBytesPerDimension in class PointValuespublic long size()
PointValuessize in class PointValuespublic int getDocCount()
PointValuesgetDocCount in class PointValuespublic boolean isLeafNode(int nodeID)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.