mirror of https://github.com/apache/lucene.git
Ensure tokens have at least 2 chars, otherwise norms are incorrect.
This commit is contained in:
parent
8322ea55f4
commit
fb30ded643
|
@ -45,7 +45,7 @@ public class TestCustomNorms extends LuceneTestCase {
|
|||
|
||||
Directory dir = newDirectory();
|
||||
MockAnalyzer analyzer = new MockAnalyzer(random());
|
||||
analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
|
||||
analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 2, IndexWriter.MAX_TERM_LENGTH));
|
||||
|
||||
IndexWriterConfig config = newIndexWriterConfig(analyzer);
|
||||
Similarity provider = new MySimProvider();
|
||||
|
|
Loading…
Reference in New Issue