addBackcompatIndexes.py: fix random seed when creating moreterms index

This commit is contained in:
Steve Rowe 2017-09-30 23:37:16 -04:00
parent ae5caf3fa6
commit 90842fa0b1
1 changed files with 1 additions and 2 deletions

View File

@ -152,11 +152,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
MockAnalyzer analyzer = new MockAnalyzer(random()); MockAnalyzer analyzer = new MockAnalyzer(random());
analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH)); analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
// TODO: remove randomness
IndexWriterConfig conf = new IndexWriterConfig(analyzer) IndexWriterConfig conf = new IndexWriterConfig(analyzer)
.setMergePolicy(mp).setUseCompoundFile(false); .setMergePolicy(mp).setUseCompoundFile(false);
IndexWriter writer = new IndexWriter(dir, conf); 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++) { for(int i=0;i<50;i++) {
writer.addDocument(docs.nextDoc()); writer.addDocument(docs.nextDoc());
} }