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.Relation
MAX_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, size
public 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.IOException
public void intersect(PointValues.IntersectVisitor visitor) throws IOException
PointValues
intersect
in class PointValues
IOException
public long estimatePointCount(PointValues.IntersectVisitor visitor)
PointValues
PointValues.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 PointValues
public BKDReader.IntersectState getIntersectState(PointValues.IntersectVisitor visitor)
BKDReader.IntersectState
public void visitLeafBlockValues(BKDReader.IndexTree index, BKDReader.IntersectState state) throws IOException
IOException
public byte[] getMinPackedValue()
PointValues
PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)
is 0
getMinPackedValue
in class PointValues
public byte[] getMaxPackedValue()
PointValues
PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)
is 0
getMaxPackedValue
in class PointValues
public int getNumDimensions()
PointValues
getNumDimensions
in class PointValues
public int getNumIndexDimensions()
PointValues
getNumIndexDimensions
in class PointValues
public int getBytesPerDimension()
PointValues
getBytesPerDimension
in class PointValues
public long size()
PointValues
size
in class PointValues
public int getDocCount()
PointValues
getDocCount
in class PointValues
public boolean isLeafNode(int nodeID)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.