fix test to prune mega-long terms

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1575520 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2014-03-08 11:14:48 +00:00
parent b97e7b5a4a
commit cb291ae038
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@ public class TestRollingUpdates extends LuceneTestCase {
Codec.setDefault(TestUtil.alwaysPostingsFormat(new MemoryPostingsFormat(random().nextBoolean(), random.nextFloat()))); Codec.setDefault(TestUtil.alwaysPostingsFormat(new MemoryPostingsFormat(random().nextBoolean(), random.nextFloat())));
} }
final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))); MockAnalyzer analyzer = new MockAnalyzer(random());
analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer));
final int SIZE = atLeast(20); final int SIZE = atLeast(20);
int id = 0; int id = 0;
IndexReader r = null; IndexReader r = null;