Do not use mock merge policy for TestSimilarity (#13314)

This commit is contained in:
Zhang Chao 2024-04-18 09:50:40 +08:00 committed by GitHub
parent f665bd196e
commit 1f1181a079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ public class TestSimilarity extends LuceneTestCase {
new RandomIndexWriter(
random(),
store,
newIndexWriterConfig(new MockAnalyzer(random())).setSimilarity(new SimpleSimilarity()));
newIndexWriterConfig(new MockAnalyzer(random()))
.setSimilarity(new SimpleSimilarity())
.setMergePolicy(newMergePolicy(random(), false)));
Document d1 = new Document();
d1.add(newTextField("field", "a c", Field.Store.YES));