Log MockRandomMergePolicy reverse in verbose. (#13117)

This commit is contained in:
Mikhail Khludnev 2024-02-27 12:09:35 +03:00 committed by GitHub
parent 6764a01805
commit 90e4c44b99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -241,6 +241,9 @@ public class MockRandomMergePolicy extends MergePolicy {
@Override
public Sorter.DocMap reorder(CodecReader reader, Directory dir) throws IOException {
if (r.nextBoolean()) {
if (LuceneTestCase.VERBOSE) {
System.out.println("NOTE: MockRandomMergePolicy now reverses reader=" + reader);
}
// Reverse the doc ID order
final int maxDoc = reader.maxDoc();
return new Sorter.DocMap() {