You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2019/07/10 07:10:15 UTC

[lucene-solr] branch branch_8x updated: Ensure tokens have at least 2 chars, otherwise norms are incorrect.

This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new daa6aba  Ensure tokens have at least 2 chars, otherwise norms are incorrect.
daa6aba is described below

commit daa6aba02969f7c0fe2ab8f415cc2c89766b252c
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Wed Jul 10 09:09:07 2019 +0200

    Ensure tokens have at least 2 chars, otherwise norms are incorrect.
---
 lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java b/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java
index 7737de1..3b3e982 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java
@@ -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();