Package org.apache.lucene.document
Class FloatPointNearestNeighbor
- java.lang.Object
-
- org.apache.lucene.document.FloatPointNearestNeighbor
-
public class FloatPointNearestNeighbor extends java.lang.Object
KNN search on top of N dimensional indexed float points.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
FloatPointNearestNeighbor.Cell
(package private) static class
FloatPointNearestNeighbor.NearestHit
private static class
FloatPointNearestNeighbor.NearestVisitor
-
Constructor Summary
Constructors Constructor Description FloatPointNearestNeighbor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static FloatPointNearestNeighbor.NearestHit[]
nearest(java.util.List<BKDReader> readers, java.util.List<Bits> liveDocs, java.util.List<java.lang.Integer> docBases, int topN, float[] origin)
static TopFieldDocs
nearest(IndexSearcher searcher, java.lang.String field, int topN, float... origin)
private static double
pointToRectangleDistanceSquared(byte[] minPackedValue, byte[] maxPackedValue, float[] value)
-
-
-
Method Detail
-
nearest
private static FloatPointNearestNeighbor.NearestHit[] nearest(java.util.List<BKDReader> readers, java.util.List<Bits> liveDocs, java.util.List<java.lang.Integer> docBases, int topN, float[] origin) throws java.io.IOException
- Throws:
java.io.IOException
-
pointToRectangleDistanceSquared
private static double pointToRectangleDistanceSquared(byte[] minPackedValue, byte[] maxPackedValue, float[] value)
-
nearest
public static TopFieldDocs nearest(IndexSearcher searcher, java.lang.String field, int topN, float... origin) throws java.io.IOException
- Throws:
java.io.IOException
-
-