From ef2b8131cf82a0acb43ee20fadcecc31699eb536 Mon Sep 17 00:00:00 2001 From: Benjamin Trent Date: Fri, 25 Oct 2024 07:42:26 -0400 Subject: [PATCH] Ensure doc order for TestCommonTermsQuery#testMinShouldMatch (#13953) --- .../org/apache/lucene/queries/TestCommonTermsQuery.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lucene/queries/src/test/org/apache/lucene/queries/TestCommonTermsQuery.java b/lucene/queries/src/test/org/apache/lucene/queries/TestCommonTermsQuery.java index b94960d587a..9282fdb7946 100644 --- a/lucene/queries/src/test/org/apache/lucene/queries/TestCommonTermsQuery.java +++ b/lucene/queries/src/test/org/apache/lucene/queries/TestCommonTermsQuery.java @@ -194,7 +194,12 @@ public class TestCommonTermsQuery extends LuceneTestCase { public void testMinShouldMatch() throws IOException { Directory dir = newDirectory(); MockAnalyzer analyzer = new MockAnalyzer(random()); - RandomIndexWriter w = new RandomIndexWriter(random(), dir, analyzer); + RandomIndexWriter w = + new RandomIndexWriter( + random(), + dir, + LuceneTestCase.newIndexWriterConfig(analyzer) + .setMergePolicy(LuceneTestCase.newMergePolicy(random(), false))); String[] docs = new String[] { "this is the end of the world right",