Module org.apache.lucene.core
Package org.apache.lucene.search
Class PointInSetQuery.SinglePointVisitor
- java.lang.Object
-
- org.apache.lucene.search.PointInSetQuery.SinglePointVisitor
-
- All Implemented Interfaces:
PointValues.IntersectVisitor
- Enclosing class:
- PointInSetQuery
private class PointInSetQuery.SinglePointVisitor extends java.lang.Object implements PointValues.IntersectVisitor
IntersectVisitor that queries against a highly degenerate shape: a single point. This is used in the > 1D case.
-
-
Field Summary
Fields Modifier and Type Field Description private DocIdSetBuilder.BulkAdder
adder
private ArrayUtil.ByteArrayComparator
comparator
private byte[]
pointBytes
private DocIdSetBuilder
result
-
Constructor Summary
Constructors Constructor Description SinglePointVisitor(DocIdSetBuilder result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointValues.Relation
compare(byte[] minPackedValue, byte[] maxPackedValue)
Called for non-leaf cells to test how the cell relates to the query, to determine how to further recurse down the tree.void
grow(int count)
Notifies the caller that this many documents are about to be visitedvoid
setPoint(BytesRef point)
void
visit(int docID)
Called for all documents in a leaf cell that's fully contained by the query.void
visit(int docID, byte[] packedValue)
Called for all documents in a leaf cell that crosses the query.void
visit(DocIdSetIterator iterator)
Similar toPointValues.IntersectVisitor.visit(int)
, but a bulk visit and implementations may have their optimizations.void
visit(DocIdSetIterator iterator, byte[] packedValue)
Similar toPointValues.IntersectVisitor.visit(int, byte[])
but in this case the packedValue can have more than one docID associated to it.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.index.PointValues.IntersectVisitor
visit
-
-
-
-
Field Detail
-
comparator
private final ArrayUtil.ByteArrayComparator comparator
-
result
private final DocIdSetBuilder result
-
pointBytes
private final byte[] pointBytes
-
adder
private DocIdSetBuilder.BulkAdder adder
-
-
Constructor Detail
-
SinglePointVisitor
public SinglePointVisitor(DocIdSetBuilder result)
-
-
Method Detail
-
setPoint
public void setPoint(BytesRef point)
-
grow
public void grow(int count)
Description copied from interface:PointValues.IntersectVisitor
Notifies the caller that this many documents are about to be visited- Specified by:
grow
in interfacePointValues.IntersectVisitor
-
visit
public void visit(int docID)
Description copied from interface:PointValues.IntersectVisitor
Called for all documents in a leaf cell that's fully contained by the query. The consumer should blindly accept the docID.- Specified by:
visit
in interfacePointValues.IntersectVisitor
-
visit
public void visit(DocIdSetIterator iterator) throws java.io.IOException
Description copied from interface:PointValues.IntersectVisitor
Similar toPointValues.IntersectVisitor.visit(int)
, but a bulk visit and implementations may have their optimizations.- Specified by:
visit
in interfacePointValues.IntersectVisitor
- Throws:
java.io.IOException
-
visit
public void visit(int docID, byte[] packedValue)
Description copied from interface:PointValues.IntersectVisitor
Called for all documents in a leaf cell that crosses the query. The consumer should scrutinize the packedValue to decide whether to accept it. In the 1D case, values are visited in increasing order, and in the case of ties, in increasing docID order.- Specified by:
visit
in interfacePointValues.IntersectVisitor
-
visit
public void visit(DocIdSetIterator iterator, byte[] packedValue) throws java.io.IOException
Description copied from interface:PointValues.IntersectVisitor
Similar toPointValues.IntersectVisitor.visit(int, byte[])
but in this case the packedValue can have more than one docID associated to it. The provided iterator should not escape the scope of this method so that implementations of PointValues are free to reuse it,- Specified by:
visit
in interfacePointValues.IntersectVisitor
- Throws:
java.io.IOException
-
compare
public PointValues.Relation compare(byte[] minPackedValue, byte[] maxPackedValue)
Description copied from interface:PointValues.IntersectVisitor
Called for non-leaf cells to test how the cell relates to the query, to determine how to further recurse down the tree.- Specified by:
compare
in interfacePointValues.IntersectVisitor
-
-