mirror of https://github.com/apache/lucene.git
LUCENE-10384: Simplify LongHeap small addition (#623)
LUCENE-10384 and PR#615 introduced encoding f into NeighborQueue. But one function `nodes()` was remained to add this encoding. Also modify the test that would fail without this patch.
This commit is contained in:
parent
11006fba59
commit
1a4f838fe2
|
@ -100,7 +100,7 @@ public class NeighborQueue {
|
|||
int size = size();
|
||||
int[] nodes = new int[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
nodes[i] = (int) heap.get(i + 1);
|
||||
nodes[i] = (int) order.apply(heap.get(i + 1));
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ public class TestHnswGraph extends LuceneTestCase {
|
|||
CircularVectorValues vectors = new CircularVectorValues(nDoc);
|
||||
HnswGraphBuilder builder =
|
||||
new HnswGraphBuilder(
|
||||
vectors, VectorSimilarityFunction.DOT_PRODUCT, 16, 100, random().nextInt());
|
||||
vectors, VectorSimilarityFunction.EUCLIDEAN, 16, 100, random().nextInt());
|
||||
HnswGraph hnsw = builder.build(vectors);
|
||||
|
||||
// Skip over half of the documents that are closest to the query vector
|
||||
|
@ -215,7 +215,7 @@ public class TestHnswGraph extends LuceneTestCase {
|
|||
10,
|
||||
10,
|
||||
vectors.randomAccess(),
|
||||
VectorSimilarityFunction.DOT_PRODUCT,
|
||||
VectorSimilarityFunction.EUCLIDEAN,
|
||||
hnsw,
|
||||
acceptOrds,
|
||||
new SplittableRandom(random().nextLong()));
|
||||
|
|
Loading…
Reference in New Issue