Module org.apache.lucene.sandbox
Class FloatPointNearestNeighbor
java.lang.Object
org.apache.lucene.sandbox.document.FloatPointNearestNeighbor
KNN search on top of N dimensional indexed float points.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
private static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static FloatPointNearestNeighbor.NearestHit[]
nearest
(List<PointValues> readers, List<Bits> liveDocs, List<Integer> docBases, int topN, float[] origin) static TopFieldDocs
nearest
(IndexSearcher searcher, String field, int topN, float... origin) private static double
pointToRectangleDistanceSquared
(byte[] minPackedValue, byte[] maxPackedValue, float[] value)
-
Constructor Details
-
FloatPointNearestNeighbor
public FloatPointNearestNeighbor()
-
-
Method Details
-
nearest
private static FloatPointNearestNeighbor.NearestHit[] nearest(List<PointValues> readers, List<Bits> liveDocs, List<Integer> docBases, int topN, float[] origin) throws IOException - Throws:
IOException
-
pointToRectangleDistanceSquared
private static double pointToRectangleDistanceSquared(byte[] minPackedValue, byte[] maxPackedValue, float[] value) -
nearest
public static TopFieldDocs nearest(IndexSearcher searcher, String field, int topN, float... origin) throws IOException - Throws:
IOException
-