mirror of
https://github.com/apache/lucene.git
synced 2025-02-08 11:05:29 +00:00
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();
|
Directory dir = newDirectory();
|
||||||
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(), 2, IndexWriter.MAX_TERM_LENGTH));
|
||||||
|
|
||||||
IndexWriterConfig config = newIndexWriterConfig(analyzer);
|
IndexWriterConfig config = newIndexWriterConfig(analyzer);
|
||||||
Similarity provider = new MySimProvider();
|
Similarity provider = new MySimProvider();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user