You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2026/02/04 17:11:30 UTC
(lucene) 03/03: Disable bypassing graph creation for HnswGraphTestCase#testReadWrite (#15419)
This is an automated email from the ASF dual-hosted git repository.
shubhamvishu pushed a commit to branch branch_10_4
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit 2fcb6e534396bb308c9c9a91738e310d273a4352
Author: Shubham Chaudhary <36...@users.noreply.github.com>
AuthorDate: Mon Dec 1 08:28:22 2025 -0500
Disable bypassing graph creation for HnswGraphTestCase#testReadWrite (#15419)
---
.../src/test/org/apache/lucene/util/hnsw/HnswGraphTestCase.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lucene/core/src/test/org/apache/lucene/util/hnsw/HnswGraphTestCase.java b/lucene/core/src/test/org/apache/lucene/util/hnsw/HnswGraphTestCase.java
index 1ed25ecf3b2..2d1ef75c3c8 100644
--- a/lucene/core/src/test/org/apache/lucene/util/hnsw/HnswGraphTestCase.java
+++ b/lucene/core/src/test/org/apache/lucene/util/hnsw/HnswGraphTestCase.java
@@ -319,7 +319,7 @@ abstract class HnswGraphTestCase<T> extends LuceneTestCase {
IndexWriterConfig iwc =
new IndexWriterConfig()
.setCodec(
- TestUtil.alwaysKnnVectorsFormat(new Lucene99HnswVectorsFormat(M, beamWidth)));
+ TestUtil.alwaysKnnVectorsFormat(new Lucene99HnswVectorsFormat(M, beamWidth, 0)));
try (IndexWriter iw = new IndexWriter(dir, iwc)) {
KnnVectorValues.DocIndexIterator it2 = v2.iterator();
while (it2.nextDoc() != NO_MORE_DOCS) {
@@ -350,9 +350,7 @@ abstract class HnswGraphTestCase<T> extends LuceneTestCase {
((CodecReader) ctx.reader()).getVectorReader())
.getFieldReader("field"))
.getGraph("field");
- if (graphValues.size() > 0) {
- assertGraphEqual(hnsw, graphValues);
- }
+ assertGraphEqual(hnsw, graphValues);
}
}
}