public class SnowballPorterFilterFactory extends BaseTokenFilterFactory implements ResourceLoaderAware
SnowballFilter, with configurable language
Note: Use of the "Lovins" stemmer is not recommended, as it is implemented with reflection.
<fieldType name="text_snowballstem" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" protected="protectedkeyword.txt" language="English"/>
</analyzer>
</fieldType>| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
language |
static java.lang.String |
PROTECTED_TOKENS |
private org.apache.lucene.analysis.CharArraySet |
protectedWords |
private java.lang.Class<?> |
stemClass |
logargs, luceneMatchVersion| Constructor and Description |
|---|
SnowballPorterFilterFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.analysis.TokenFilter |
create(org.apache.lucene.analysis.TokenStream input)
Transform the specified input TokenStream
|
void |
inform(ResourceLoader loader) |
void |
init(java.util.Map<java.lang.String,java.lang.String> args)
init will be called just once, immediately after creation. |
assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getSnowballWordSet, getWordSet, warnDeprecatedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArgspublic static final java.lang.String PROTECTED_TOKENS
private java.lang.String language
private java.lang.Class<?> stemClass
private org.apache.lucene.analysis.CharArraySet protectedWords
public void inform(ResourceLoader loader)
inform in interface ResourceLoaderAwarepublic void init(java.util.Map<java.lang.String,java.lang.String> args)
TokenFilterFactoryinit will be called just once, immediately after creation.
The args are user-level initialization parameters that may be specified when declaring the factory in the schema.xml
init in interface TokenFilterFactoryinit in class BaseTokenStreamFactorypublic org.apache.lucene.analysis.TokenFilter create(org.apache.lucene.analysis.TokenStream input)
TokenFilterFactorycreate in interface TokenFilterFactory