add kstem also to the static shared token filters
This commit is contained in:
parent
aefc3ab3e5
commit
3e9dff8b7e
|
@ -330,7 +330,7 @@ public class AnalysisModule extends AbstractModule {
|
|||
tokenFiltersBindings.processTokenFilter("length", LengthTokenFilterFactory.class);
|
||||
tokenFiltersBindings.processTokenFilter("lowercase", LowerCaseTokenFilterFactory.class);
|
||||
tokenFiltersBindings.processTokenFilter("porter_stem", PorterStemTokenFilterFactory.class);
|
||||
tokenFiltersBindings.processTokenFilter("k_stem", KStemTokenFilterFactory.class);
|
||||
tokenFiltersBindings.processTokenFilter("kstem", KStemTokenFilterFactory.class);
|
||||
tokenFiltersBindings.processTokenFilter("standard", StandardTokenFilterFactory.class);
|
||||
tokenFiltersBindings.processTokenFilter("nGram", NGramTokenFilterFactory.class);
|
||||
tokenFiltersBindings.processTokenFilter("ngram", NGramTokenFilterFactory.class);
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.apache.lucene.analysis.de.GermanAnalyzer;
|
|||
import org.apache.lucene.analysis.de.GermanStemFilter;
|
||||
import org.apache.lucene.analysis.el.GreekAnalyzer;
|
||||
import org.apache.lucene.analysis.en.EnglishAnalyzer;
|
||||
import org.apache.lucene.analysis.en.KStemFilter;
|
||||
import org.apache.lucene.analysis.es.SpanishAnalyzer;
|
||||
import org.apache.lucene.analysis.eu.BasqueAnalyzer;
|
||||
import org.apache.lucene.analysis.fa.PersianAnalyzer;
|
||||
|
@ -341,6 +342,16 @@ public class IndicesAnalysisService extends AbstractComponent {
|
|||
}
|
||||
}));
|
||||
|
||||
tokenFilterFactories.put("kstem", new PreBuiltTokenFilterFactoryFactory(new TokenFilterFactory() {
|
||||
@Override public String name() {
|
||||
return "kstem";
|
||||
}
|
||||
|
||||
@Override public TokenStream create(TokenStream tokenStream) {
|
||||
return new KStemFilter(tokenStream);
|
||||
}
|
||||
}));
|
||||
|
||||
tokenFilterFactories.put("porter_stem", new PreBuiltTokenFilterFactoryFactory(new TokenFilterFactory() {
|
||||
@Override public String name() {
|
||||
return "porter_stem";
|
||||
|
|
Loading…
Reference in New Issue