mirror of https://github.com/apache/lucene.git
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e35500dc13
|
@ -141,7 +141,12 @@ public class TestIndexSorting extends LuceneTestCase {
|
|||
Sort indexSort = new Sort(sortField,
|
||||
new SortField("id", SortField.Type.INT));
|
||||
iwc.setIndexSort(indexSort);
|
||||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
LogMergePolicy policy = newLogMergePolicy();
|
||||
// make sure that merge factor is always > 2
|
||||
if (policy.getMergeFactor() <= 2) {
|
||||
policy.setMergeFactor(3);
|
||||
}
|
||||
iwc.setMergePolicy(policy);
|
||||
|
||||
// add already sorted documents
|
||||
codec.numCalls = 0;
|
||||
|
|
|
@ -156,7 +156,7 @@ public class MockRandomMergePolicy extends MergePolicy {
|
|||
if (LuceneTestCase.VERBOSE) {
|
||||
System.out.println("NOTE: MockRandomMergePolicy now swaps in a SlowCodecReaderWrapper for merging reader=" + reader);
|
||||
}
|
||||
return SlowCodecReaderWrapper.wrap(new FilterLeafReader(reader) {});
|
||||
return SlowCodecReaderWrapper.wrap(new FilterLeafReader(new MergeReaderWrapper(reader)) {});
|
||||
} else if (thingToDo == 1) {
|
||||
// renumber fields
|
||||
// NOTE: currently this only "blocks" bulk merges just by
|
||||
|
@ -165,7 +165,7 @@ public class MockRandomMergePolicy extends MergePolicy {
|
|||
if (LuceneTestCase.VERBOSE) {
|
||||
System.out.println("NOTE: MockRandomMergePolicy now swaps in a MismatchedLeafReader for merging reader=" + reader);
|
||||
}
|
||||
return SlowCodecReaderWrapper.wrap(new MismatchedLeafReader(reader, r));
|
||||
return SlowCodecReaderWrapper.wrap(new MismatchedLeafReader(new MergeReaderWrapper(reader), r));
|
||||
} else {
|
||||
// otherwise, reader is unchanged
|
||||
return reader;
|
||||
|
|
Loading…
Reference in New Issue