Apache Lucene open-source search software
Fix test that was implicitly assuming simple writer config that would not rearrange docids (#14122)
Michael Sokolov0169c1efea05
diff --git a/lucene/misc/src/test/org/apache/lucene/misc/index/TestBpVectorReorderer.java b/lucene/misc/src/test/org/apache/lucene/misc/index/TestBpVectorReorderer.javaindex 7441e68f7d4..bea3812e417 100644--- a/lucene/misc/src/test/org/apache/lucene/misc/index/TestBpVectorReorderer.java+++ b/lucene/misc/src/test/org/apache/lucene/misc/index/TestBpVectorReorderer.java@@ -380,7 +380,7 @@ public class TestBpVectorReorderer extends LuceneTestCase {int maxDoc = 0;try (Directory dir = newFSDirectory(tmpdir)) {// create an index with a single leaf- try (IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig())) {+ try (IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig())) {for (float[] vector : vectors) {Document doc = new Document();if (random().nextBoolean()) {@@ -394,7 +394,6 @@ public class TestBpVectorReorderer extends LuceneTestCase {writer.addDocument(doc);maxDoc++;}- writer.forceMerge(1);}// reorder using the index reordering toolBpVectorReorderer.main(