From 90842fa0b1bcada723f75420e5f2cc23fdd1f767 Mon Sep 17 00:00:00 2001 From: Steve Rowe Date: Sat, 30 Sep 2017 23:37:16 -0400 Subject: [PATCH] addBackcompatIndexes.py: fix random seed when creating moreterms index --- .../org/apache/lucene/index/TestBackwardsCompatibility.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java index 7437e75679a..eb6a3e16255 100644 --- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java +++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java @@ -152,11 +152,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase { MockAnalyzer analyzer = new MockAnalyzer(random()); analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH)); - // TODO: remove randomness IndexWriterConfig conf = new IndexWriterConfig(analyzer) .setMergePolicy(mp).setUseCompoundFile(false); IndexWriter writer = new IndexWriter(dir, conf); - LineFileDocs docs = new LineFileDocs(random()); + LineFileDocs docs = new LineFileDocs(new Random(0)); for(int i=0;i<50;i++) { writer.addDocument(docs.nextDoc()); }