Package org.apache.lucene.search
Class NearestNeighbor.NearestVisitor
- java.lang.Object
-
- org.apache.lucene.search.NearestNeighbor.NearestVisitor
-
- All Implemented Interfaces:
PointValues.IntersectVisitor
- Enclosing class:
- NearestNeighbor
private static class NearestNeighbor.NearestVisitor extends java.lang.Object implements PointValues.IntersectVisitor
-
-
Field Summary
Fields Modifier and Type Field Description intcurDocBaseBitscurLiveDocs(package private) java.util.PriorityQueue<NearestNeighbor.NearestHit>hitQueueprivate doublemaxLatprivate doublemaxLonprivate doubleminLatprivate doubleminLonprivate doubleminLon2(package private) doublepointLat(package private) doublepointLonprivate intsetBottomCounter(package private) inttopN
-
Constructor Summary
Constructors Constructor Description NearestVisitor(java.util.PriorityQueue<NearestNeighbor.NearestHit> hitQueue, int topN, double pointLat, double pointLon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointValues.Relationcompare(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.private voidmaybeUpdateBBox()voidvisit(int docID)Called for all documents in a leaf cell that's fully contained by the query.voidvisit(int docID, byte[] packedValue)Called for all documents in a leaf cell that crosses the query.-
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
grow, visit
-
-
-
-
Field Detail
-
curDocBase
public int curDocBase
-
curLiveDocs
public Bits curLiveDocs
-
topN
final int topN
-
hitQueue
final java.util.PriorityQueue<NearestNeighbor.NearestHit> hitQueue
-
pointLat
final double pointLat
-
pointLon
final double pointLon
-
setBottomCounter
private int setBottomCounter
-
minLon
private double minLon
-
maxLon
private double maxLon
-
minLat
private double minLat
-
maxLat
private double maxLat
-
minLon2
private double minLon2
-
-
Constructor Detail
-
NearestVisitor
public NearestVisitor(java.util.PriorityQueue<NearestNeighbor.NearestHit> hitQueue, int topN, double pointLat, double pointLon)
-
-
Method Detail
-
visit
public void visit(int docID)
Description copied from interface:PointValues.IntersectVisitorCalled for all documents in a leaf cell that's fully contained by the query. The consumer should blindly accept the docID.- Specified by:
visitin interfacePointValues.IntersectVisitor
-
maybeUpdateBBox
private void maybeUpdateBBox()
-
visit
public void visit(int docID, byte[] packedValue)Description copied from interface:PointValues.IntersectVisitorCalled 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:
visitin interfacePointValues.IntersectVisitor
-
compare
public PointValues.Relation compare(byte[] minPackedValue, byte[] maxPackedValue)
Description copied from interface:PointValues.IntersectVisitorCalled for non-leaf cells to test how the cell relates to the query, to determine how to further recurse down the tree.- Specified by:
comparein interfacePointValues.IntersectVisitor
-
-