Ensure tokens have at least 2 chars, otherwise norms are incorrect.

This commit is contained in:
Adrien Grand 2019-07-10 09:09:07 +02:00
parent 8322ea55f4
commit fb30ded643
1 changed files with 1 additions and 1 deletions

View File

@ -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();