diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 2a7e5689ba7..a79d69eb047 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -70,6 +70,10 @@ Improvements * LUCENE-7359: Add equals() and hashCode() to Explanation (Alan Woodward) +* LUCENE-7353: ScandinavianFoldingFilterFactory and + ScandinavianNormalizationFilterFactory now implement MultiTermAwareComponent. + (Adrien Grand) + Optimizations * LUCENE-7330, LUCENE-7339: Speed up conjunction queries. (Adrien Grand) diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianFoldingFilterFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianFoldingFilterFactory.java index 6f2ae12f78b..cd98ecd10bc 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianFoldingFilterFactory.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianFoldingFilterFactory.java @@ -18,6 +18,8 @@ package org.apache.lucene.analysis.miscellaneous; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.util.AbstractAnalysisFactory; +import org.apache.lucene.analysis.util.MultiTermAwareComponent; import org.apache.lucene.analysis.util.TokenFilterFactory; import java.util.Map; @@ -32,7 +34,8 @@ import java.util.Map; * </analyzer> * </fieldType> */ -public class ScandinavianFoldingFilterFactory extends TokenFilterFactory { +public class ScandinavianFoldingFilterFactory extends TokenFilterFactory + implements MultiTermAwareComponent { public ScandinavianFoldingFilterFactory(Map args) { super(args); @@ -45,4 +48,9 @@ public class ScandinavianFoldingFilterFactory extends TokenFilterFactory { public ScandinavianFoldingFilter create(TokenStream input) { return new ScandinavianFoldingFilter(input); } + + @Override + public AbstractAnalysisFactory getMultiTermComponent() { + return this; + } } diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianNormalizationFilterFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianNormalizationFilterFactory.java index 1873c8d6786..fa9c8300df2 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianNormalizationFilterFactory.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ScandinavianNormalizationFilterFactory.java @@ -18,6 +18,8 @@ package org.apache.lucene.analysis.miscellaneous; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.util.AbstractAnalysisFactory; +import org.apache.lucene.analysis.util.MultiTermAwareComponent; import org.apache.lucene.analysis.util.TokenFilterFactory; import java.util.Map; @@ -32,7 +34,8 @@ import java.util.Map; * </analyzer> * </fieldType> */ -public class ScandinavianNormalizationFilterFactory extends TokenFilterFactory { +public class ScandinavianNormalizationFilterFactory extends TokenFilterFactory + implements MultiTermAwareComponent { public ScandinavianNormalizationFilterFactory(Map args) { super(args); @@ -45,4 +48,9 @@ public class ScandinavianNormalizationFilterFactory extends TokenFilterFactory { public ScandinavianNormalizationFilter create(TokenStream input) { return new ScandinavianNormalizationFilter(input); } + + @Override + public AbstractAnalysisFactory getMultiTermComponent() { + return this; + } }