Package org.apache.lucene.index
Class PointValuesWriter.MutableSortingPointValues
- java.lang.Object
-
- org.apache.lucene.index.PointValues
-
- org.apache.lucene.codecs.MutablePointValues
-
- org.apache.lucene.index.PointValuesWriter.MutableSortingPointValues
-
- Enclosing class:
- PointValuesWriter
static final class PointValuesWriter.MutableSortingPointValues extends MutablePointValues
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.PointValues
PointValues.IntersectVisitor, PointValues.Relation
-
-
Field Summary
Fields Modifier and Type Field Description private Sorter.DocMap
docMap
private MutablePointValues
in
-
Fields inherited from class org.apache.lucene.index.PointValues
MAX_DIMENSIONS, MAX_NUM_BYTES
-
-
Constructor Summary
Constructors Constructor Description MutableSortingPointValues(MutablePointValues in, Sorter.DocMap docMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
estimatePointCount(PointValues.IntersectVisitor visitor)
Estimate the number of points that would be visited byPointValues.intersect(org.apache.lucene.index.PointValues.IntersectVisitor)
with the givenPointValues.IntersectVisitor
.byte
getByteAt(int i, int k)
Get the k-th byte of the i-th value.int
getBytesPerDimension()
Returns the number of bytes per dimensionint
getDocCount()
Returns the total number of documents that have indexed at least one point.int
getDocID(int i)
Return the doc ID of the i-th value.byte[]
getMaxPackedValue()
Returns maximum value for each dimension, packed, or null ifPointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)
is0
byte[]
getMinPackedValue()
Returns minimum value for each dimension, packed, or null ifPointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)
is0
int
getNumDataDimensions()
Returns how many data dimensions are represented in the valuesint
getNumIndexDimensions()
Returns how many dimensions are used for the indexvoid
getValue(int i, BytesRef packedValue)
SetpackedValue
with a reference to the packed bytes of the i-th value.void
intersect(PointValues.IntersectVisitor visitor)
Finds all documents and points matching the provided visitor.long
size()
Returns the total number of indexed points across all documents.void
swap(int i, int j)
Swap the i-th and j-th values.-
Methods inherited from class org.apache.lucene.index.PointValues
estimateDocCount, getDocCount, getMaxPackedValue, getMinPackedValue, size
-
-
-
-
Field Detail
-
in
private final MutablePointValues in
-
docMap
private final Sorter.DocMap docMap
-
-
Constructor Detail
-
MutableSortingPointValues
public MutableSortingPointValues(MutablePointValues in, Sorter.DocMap docMap)
-
-
Method Detail
-
intersect
public void intersect(PointValues.IntersectVisitor visitor) throws java.io.IOException
Description copied from class:PointValues
Finds all documents and points matching the provided visitor. This method does not enforce live documents, so it's up to the caller to test whether each document is deleted, if necessary.- Specified by:
intersect
in classPointValues
- Throws:
java.io.IOException
-
estimatePointCount
public long estimatePointCount(PointValues.IntersectVisitor visitor)
Description copied from class:PointValues
Estimate the number of points that would be visited byPointValues.intersect(org.apache.lucene.index.PointValues.IntersectVisitor)
with the givenPointValues.IntersectVisitor
. This should run many times faster thanPointValues.intersect(IntersectVisitor)
.- Specified by:
estimatePointCount
in classPointValues
-
getMinPackedValue
public byte[] getMinPackedValue() throws java.io.IOException
Description copied from class:PointValues
Returns minimum value for each dimension, packed, or null ifPointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)
is0
- Specified by:
getMinPackedValue
in classPointValues
- Throws:
java.io.IOException
-
getMaxPackedValue
public byte[] getMaxPackedValue() throws java.io.IOException
Description copied from class:PointValues
Returns maximum value for each dimension, packed, or null ifPointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)
is0
- Specified by:
getMaxPackedValue
in classPointValues
- Throws:
java.io.IOException
-
getNumDataDimensions
public int getNumDataDimensions() throws java.io.IOException
Description copied from class:PointValues
Returns how many data dimensions are represented in the values- Specified by:
getNumDataDimensions
in classPointValues
- Throws:
java.io.IOException
-
getNumIndexDimensions
public int getNumIndexDimensions() throws java.io.IOException
Description copied from class:PointValues
Returns how many dimensions are used for the index- Specified by:
getNumIndexDimensions
in classPointValues
- Throws:
java.io.IOException
-
getBytesPerDimension
public int getBytesPerDimension() throws java.io.IOException
Description copied from class:PointValues
Returns the number of bytes per dimension- Specified by:
getBytesPerDimension
in classPointValues
- Throws:
java.io.IOException
-
size
public long size()
Description copied from class:PointValues
Returns the total number of indexed points across all documents.- Specified by:
size
in classPointValues
-
getDocCount
public int getDocCount()
Description copied from class:PointValues
Returns the total number of documents that have indexed at least one point.- Specified by:
getDocCount
in classPointValues
-
getValue
public void getValue(int i, BytesRef packedValue)
Description copied from class:MutablePointValues
SetpackedValue
with a reference to the packed bytes of the i-th value.- Specified by:
getValue
in classMutablePointValues
-
getByteAt
public byte getByteAt(int i, int k)
Description copied from class:MutablePointValues
Get the k-th byte of the i-th value.- Specified by:
getByteAt
in classMutablePointValues
-
getDocID
public int getDocID(int i)
Description copied from class:MutablePointValues
Return the doc ID of the i-th value.- Specified by:
getDocID
in classMutablePointValues
-
swap
public void swap(int i, int j)
Description copied from class:MutablePointValues
Swap the i-th and j-th values.- Specified by:
swap
in classMutablePointValues
-
-