Skip to content

Apache Lucene open-source search software

LUCENE-7974: nearest() method returning NearestHit should be private, and NearestHit class should be package private

Steve Rowe74050a3f159e
diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/FloatPointNearestNeighbor.java b/lucene/sandbox/src/java/org/apache/lucene/document/FloatPointNearestNeighbor.java
index b7859d04500..90a80b69f0f 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/document/FloatPointNearestNeighbor.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/document/FloatPointNearestNeighbor.java
@@ -194,7 +194,7 @@ public class FloatPointNearestNeighbor {
}
/** Holds one hit from {@link FloatPointNearestNeighbor#nearest} */
- public static class NearestHit {
+ static class NearestHit {
public int docID;
public double distanceSquared;
@@ -204,7 +204,7 @@ public class FloatPointNearestNeighbor {
}
}
- public static NearestHit[] nearest(List<BKDReader> readers, List<Bits> liveDocs, List<Integer> docBases, final int topN, float[] origin) throws IOException {
+ private static NearestHit[] nearest(List<BKDReader> readers, List<Bits> liveDocs, List<Integer> docBases, final int topN, float[] origin) throws IOException {
// System.out.println("NEAREST: readers=" + readers + " liveDocs=" + liveDocs + " origin: " + Arrays.toString(origin));