mirror of https://github.com/apache/lucene.git
LUCENE-5668: fix the codec so segment sizes don't change on each flush
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1594107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fdd8428cc1
commit
23760573f9
|
@ -18,6 +18,7 @@ package org.apache.lucene.index;
|
|||
*/
|
||||
|
||||
import org.apache.lucene.analysis.MockAnalyzer;
|
||||
import org.apache.lucene.codecs.Codec;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.store.Directory;
|
||||
|
@ -218,6 +219,8 @@ public class TestTieredMergePolicy extends BaseMergePolicyTestCase {
|
|||
IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
|
||||
TieredMergePolicy tmp = (TieredMergePolicy) iwc.getMergePolicy();
|
||||
tmp.setFloorSegmentMB(0.00001);
|
||||
// We need stable sizes for each segment:
|
||||
iwc.setCodec(Codec.forName("Lucene46"));
|
||||
iwc.setMergeScheduler(new SerialMergeScheduler());
|
||||
iwc.setMaxBufferedDocs(100);
|
||||
iwc.setRAMBufferSizeMB(-1);
|
||||
|
|
Loading…
Reference in New Issue