java.lang.Object
org.apache.lucene.document.NearestNeighbor
KNN search on top of 2D lat/lon indexed points.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record
(package private) static class
private static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static double
approxBestDistance
(byte[] minPackedValue, byte[] maxPackedValue, double pointLat, double pointLon) private static double
approxBestDistance
(double minLat, double maxLat, double minLon, double maxLon, double pointLat, double pointLon) static NearestNeighbor.NearestHit[]
nearest
(double pointLat, double pointLon, List<PointValues> readers, List<Bits> liveDocs, IntArrayList docBases, int n)
-
Constructor Details
-
NearestNeighbor
NearestNeighbor()
-
-
Method Details
-
nearest
public static NearestNeighbor.NearestHit[] nearest(double pointLat, double pointLon, List<PointValues> readers, List<Bits> liveDocs, IntArrayList docBases, int n) throws IOException - Throws:
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)
-