Package org.apache.lucene.search
Class NearestNeighbor
- java.lang.Object
-
- org.apache.lucene.search.NearestNeighbor
-
class NearestNeighbor extends java.lang.ObjectKNN search on top of 2D lat/lon indexed points.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classNearestNeighbor.Cell(package private) static classNearestNeighbor.NearestHitprivate static classNearestNeighbor.NearestVisitor
-
Constructor Summary
Constructors Constructor Description NearestNeighbor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static doubleapproxBestDistance(byte[] minPackedValue, byte[] maxPackedValue, double pointLat, double pointLon)private static doubleapproxBestDistance(double minLat, double maxLat, double minLon, double maxLon, double pointLat, double pointLon)static NearestNeighbor.NearestHit[]nearest(double pointLat, double pointLon, java.util.List<BKDReader> readers, java.util.List<Bits> liveDocs, java.util.List<java.lang.Integer> docBases, int n)
-
-
-
Method Detail
-
nearest
public static NearestNeighbor.NearestHit[] nearest(double pointLat, double pointLon, java.util.List<BKDReader> readers, java.util.List<Bits> liveDocs, java.util.List<java.lang.Integer> docBases, int n) throws java.io.IOException
- Throws:
java.io.IOException
-
approxBestDistance
private static double approxBestDistance(byte[] minPackedValue, byte[] maxPackedValue, double pointLat, double pointLon)
-
approxBestDistance
private static double approxBestDistance(double minLat, double maxLat, double minLon, double maxLon, double pointLat, double pointLon)
-
-