From e69c48b8d941f44bb73f0594b5f72947efe80948 Mon Sep 17 00:00:00 2001 From: Michael Sokolov Date: Sun, 18 Sep 2022 20:21:39 +0000 Subject: [PATCH] Fix rare bug in TestKnnVectorQuery when we have multiple segments --- .../src/test/org/apache/lucene/search/TestKnnVectorQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java index 88d2b3674fb..df7f03f1901 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java @@ -833,7 +833,7 @@ public class TestKnnVectorQuery extends LuceneTestCase { */ private Directory getStableIndexStore(String field, float[]... contents) throws IOException { Directory indexStore = newDirectory(); - try (IndexWriter writer = new IndexWriter(indexStore, newIndexWriterConfig())) { + try (IndexWriter writer = new IndexWriter(indexStore, new IndexWriterConfig())) { VectorEncoding encoding = randomVectorEncoding(); for (int i = 0; i < contents.length; ++i) { Document doc = new Document();