lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject [2/2] lucene-solr:master: LUCENE-8273: Don't wrap MinHashFilter in a condition
Date Tue, 22 May 2018 08:09:54 GMT
LUCENE-8273: Don't wrap MinHashFilter in a condition

MinHashFilter needs to consume the entire tokenstream, so wrapping it in a
randomized condition makes no sense, and breaks offsets.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/24c186ef
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/24c186ef
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/24c186ef

Branch: refs/heads/master
Commit: 24c186eff9a9b2b2c0a86fc0a828bd81ba0993e8
Parents: 0bf1eae
Author: Alan Woodward <romseygeek@apache.org>
Authored: Tue May 22 09:08:23 2018 +0100
Committer: Alan Woodward <romseygeek@apache.org>
Committed: Tue May 22 09:09:36 2018 +0100

----------------------------------------------------------------------
 .../test/org/apache/lucene/analysis/core/TestRandomChains.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/24c186ef/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
----------------------------------------------------------------------
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
index e393e5e..8cb1591 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
@@ -71,6 +71,7 @@ import org.apache.lucene.analysis.compound.TestCompoundWordTokenFilter;
 import org.apache.lucene.analysis.compound.hyphenation.HyphenationTree;
 import org.apache.lucene.analysis.hunspell.Dictionary;
 import org.apache.lucene.analysis.hunspell.TestHunspellStemFilter;
+import org.apache.lucene.analysis.minhash.MinHashFilter;
 import org.apache.lucene.analysis.miscellaneous.ConditionalTokenFilter;
 import org.apache.lucene.analysis.miscellaneous.DelimitedTermFrequencyTokenFilter;
 import org.apache.lucene.analysis.miscellaneous.FingerprintFilter;
@@ -120,6 +121,8 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
   static {
     // Fingerprint filter needs to consume the whole tokenstream, so conditionals don't make
sense here
     avoidConditionals.add(FingerprintFilter.class);
+    // Ditto MinHashFilter
+    avoidConditionals.add(MinHashFilter.class);
   }
 
   private static final Map<Constructor<?>,Predicate<Object[]>> brokenConstructors
= new HashMap<>();


Mime
View raw message