LUCENE-7353: ScandinavianFoldingFilterFactory and ScandinavianNormalizationFilterFactory now implement MultiTermAwareComponent.

This commit is contained in:
Adrien Grand 2016-07-04 09:42:28 +02:00
parent d66e9935c3
commit 513cfd77e4
3 changed files with 22 additions and 2 deletions

View File

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

View File

@ -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>
* &lt;/fieldType&gt;</pre>
*/
public class ScandinavianFoldingFilterFactory extends TokenFilterFactory {
public class ScandinavianFoldingFilterFactory extends TokenFilterFactory
implements MultiTermAwareComponent {
public ScandinavianFoldingFilterFactory(Map<String,String> 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;
}
}

View File

@ -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;
* &lt;/analyzer&gt;
* &lt;/fieldType&gt;</pre>
*/
public class ScandinavianNormalizationFilterFactory extends TokenFilterFactory {
public class ScandinavianNormalizationFilterFactory extends TokenFilterFactory
implements MultiTermAwareComponent {
public ScandinavianNormalizationFilterFactory(Map<String, String> 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;
}
}