mirror of https://github.com/apache/lucene.git
addBackcompatIndexes.py: fix random seed when creating moreterms index
This commit is contained in:
parent
ae5caf3fa6
commit
90842fa0b1
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue