LUCENE-5711: fix solr tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1598853 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2014-05-31 11:29:21 +00:00
parent 963bf0a4db
commit ef57126633
2 changed files with 17 additions and 13 deletions

View File

@ -30,6 +30,5 @@ class DummyMergePolicy extends LogByteSizeMergePolicy {
public DummyMergePolicy(IndexWriter writer) {
super();
setIndexWriter(writer);
}
}

View File

@ -55,39 +55,44 @@ public final class RandomMergePolicy extends MergePolicy {
inner.getClass(), inner);
}
@Override
public void close() {
inner.close();
}
public MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos)
@Override
public MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter writer)
throws IOException {
return inner.findForcedDeletesMerges(segmentInfos);
return inner.findForcedDeletesMerges(segmentInfos, writer);
}
@Override
public MergeSpecification findForcedMerges(SegmentInfos segmentInfos,
int maxSegmentCount,
Map<SegmentCommitInfo,Boolean> segmentsToMerge)
Map<SegmentCommitInfo,Boolean> segmentsToMerge,
IndexWriter writer)
throws IOException {
return inner.findForcedMerges(segmentInfos, maxSegmentCount, segmentsToMerge);
return inner.findForcedMerges(segmentInfos, maxSegmentCount, segmentsToMerge, writer);
}
@Override
public MergeSpecification findMerges(MergeTrigger mergeTrigger,
SegmentInfos segmentInfos)
SegmentInfos segmentInfos,
IndexWriter writer)
throws IOException {
return inner.findMerges(mergeTrigger, segmentInfos);
}
public void setIndexWriter(IndexWriter writer) {
inner.setIndexWriter(writer);
return inner.findMerges(mergeTrigger, segmentInfos, writer);
}
@Override
public boolean useCompoundFile(SegmentInfos infos,
SegmentCommitInfo mergedInfo)
SegmentCommitInfo mergedInfo,
IndexWriter writer)
throws IOException {
return inner.useCompoundFile(infos, mergedInfo);
return inner.useCompoundFile(infos, mergedInfo, writer);
}
}