mirror of https://github.com/apache/lucene.git
LUCENE-4055: remove redundant parameter
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4055@1341680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b1693f5cab
commit
4a4c56b99d
|
@ -2294,7 +2294,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
|||
codec, null, null);
|
||||
|
||||
SegmentMerger merger = new SegmentMerger(info, infoStream, trackingDir, config.getTermIndexInterval(),
|
||||
mergedName, MergeState.CheckAbort.NONE, payloadProcessorProvider,
|
||||
MergeState.CheckAbort.NONE, payloadProcessorProvider,
|
||||
new FieldInfos.Builder(globalFieldNumberMap), codec, context);
|
||||
|
||||
for (IndexReader reader : readers) { // add new indexes
|
||||
|
@ -3438,7 +3438,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
|||
final MergeState.CheckAbort checkAbort = new MergeState.CheckAbort(merge, directory);
|
||||
final TrackingDirectoryWrapper dirWrapper = new TrackingDirectoryWrapper(directory);
|
||||
|
||||
SegmentMerger merger = new SegmentMerger(merge.info.info, infoStream, dirWrapper, config.getTermIndexInterval(), mergedName, checkAbort,
|
||||
SegmentMerger merger = new SegmentMerger(merge.info.info, infoStream, dirWrapper, config.getTermIndexInterval(), checkAbort,
|
||||
payloadProcessorProvider, new FieldInfos.Builder(globalFieldNumberMap), codec, context);
|
||||
|
||||
if (infoStream.isEnabled("IW")) {
|
||||
|
|
|
@ -46,7 +46,6 @@ import org.apache.lucene.util.ReaderUtil;
|
|||
*/
|
||||
final class SegmentMerger {
|
||||
private final Directory directory;
|
||||
private final String segment;
|
||||
private final int termIndexInterval;
|
||||
|
||||
private final Codec codec;
|
||||
|
@ -58,7 +57,7 @@ final class SegmentMerger {
|
|||
|
||||
// nocommit nuke name since SI has it.... but Directory is
|
||||
// NOT the same!!
|
||||
SegmentMerger(SegmentInfo segmentInfo, InfoStream infoStream, Directory dir, int termIndexInterval, String name,
|
||||
SegmentMerger(SegmentInfo segmentInfo, InfoStream infoStream, Directory dir, int termIndexInterval,
|
||||
MergeState.CheckAbort checkAbort, PayloadProcessorProvider payloadProcessorProvider,
|
||||
FieldInfos.Builder fieldInfosBuilder, Codec codec, IOContext context) {
|
||||
mergeState.segmentInfo = segmentInfo;
|
||||
|
@ -67,7 +66,6 @@ final class SegmentMerger {
|
|||
mergeState.checkAbort = checkAbort;
|
||||
mergeState.payloadProcessorProvider = payloadProcessorProvider;
|
||||
directory = dir;
|
||||
segment = name;
|
||||
this.termIndexInterval = termIndexInterval;
|
||||
this.codec = codec;
|
||||
this.context = context;
|
||||
|
@ -134,7 +132,7 @@ final class SegmentMerger {
|
|||
|
||||
// write the merged infos
|
||||
FieldInfosWriter fieldInfosWriter = codec.fieldInfosFormat().getFieldInfosWriter();
|
||||
fieldInfosWriter.write(directory, segment, mergeState.fieldInfos, context);
|
||||
fieldInfosWriter.write(directory, mergeState.segmentInfo.name, mergeState.fieldInfos, context);
|
||||
|
||||
return mergeState;
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ public class TestDoc extends LuceneTestCase {
|
|||
final SegmentInfo si = new SegmentInfo(si1.info.dir, Constants.LUCENE_MAIN_VERSION, merged, 10000, -1, merged, false, null, false, codec, null, null);
|
||||
|
||||
SegmentMerger merger = new SegmentMerger(si, InfoStream.getDefault(), trackingDir, IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL,
|
||||
merged, MergeState.CheckAbort.NONE, null, new FieldInfos.Builder(), codec, context);
|
||||
MergeState.CheckAbort.NONE, null, new FieldInfos.Builder(), codec, context);
|
||||
|
||||
merger.add(r1);
|
||||
merger.add(r2);
|
||||
|
|
|
@ -80,7 +80,7 @@ public class TestSegmentMerger extends LuceneTestCase {
|
|||
final SegmentInfo si = new SegmentInfo(mergedDir, Constants.LUCENE_MAIN_VERSION, mergedSegment, 10000, -1, mergedSegment, false, null, false, codec, null, null);
|
||||
|
||||
SegmentMerger merger = new SegmentMerger(si, InfoStream.getDefault(), mergedDir, IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL,
|
||||
mergedSegment, MergeState.CheckAbort.NONE, null, new FieldInfos.Builder(), codec, newIOContext(random()));
|
||||
MergeState.CheckAbort.NONE, null, new FieldInfos.Builder(), codec, newIOContext(random()));
|
||||
merger.add(reader1);
|
||||
merger.add(reader2);
|
||||
MergeState mergeState = merger.merge();
|
||||
|
|
Loading…
Reference in New Issue