/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//The variables for the new merged segment
//First segment to be merged
//Second Segment to be merged
super.setUp();
mergedDir = newDirectory();
merge1Dir = newDirectory();
merge2Dir = newDirectory();
}
super.tearDown();
}
public void test() {
}
SegmentMerger merger = new SegmentMerger(mergedDir, IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL, mergedSegment, null, null, new FieldInfos());
//Should be able to open a new SegmentReader against the new directory
//There are 2 unstored fields on the document
//System.out.println("Terms size: " + terms.length);
//System.out.println("Freqs size: " + freqs.length);
//System.out.println("Term: " + term + " Freq: " + freq);
}
}
// LUCENE-3143
// Create an index w/ .del file
w.addDocument(new Document());
w.addDocument(doc);
w.commit();
w.close();
// Assert that SM fails if .del exists
boolean doFail = false;
try {
doFail = true;
} catch (AssertionError e) {
// expected
}
// Create an index w/ .s*
w = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.CREATE));
w.addDocument(doc);
w.close();
r.close();
// Assert that SM fails if .s* exists
try {
doFail = true;
} catch (AssertionError e) {
// expected
}
}
}