Do not use mock merge policy for TestFuzzyQuery#testFuzziness (#13070)

This commit is contained in:
Zhang Chao 2024-02-08 01:05:32 +08:00 committed by GitHub
parent ce0fa2a6a6
commit 5e3e7465c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -67,7 +67,12 @@ public class TestFuzzyQuery extends LuceneTestCase {
public void testFuzziness() throws Exception { public void testFuzziness() throws Exception {
Directory directory = newDirectory(); Directory directory = newDirectory();
RandomIndexWriter writer = new RandomIndexWriter(random(), directory); RandomIndexWriter writer =
new RandomIndexWriter(
random(),
directory,
newIndexWriterConfig(new MockAnalyzer(random()))
.setMergePolicy(newMergePolicy(random(), false)));
addDoc("aaaaa", writer); addDoc("aaaaa", writer);
addDoc("aaaab", writer); addDoc("aaaab", writer);
addDoc("aaabb", writer); addDoc("aaabb", writer);