public class SnowballPorterFilterFactory extends TokenFilterFactory 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 |
|---|---|
static String |
NAME
SPI name
|
static String |
PROTECTED_TOKENS |
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion| Constructor and Description |
|---|
SnowballPorterFilterFactory(Map<String,String> args)
Creates a new SnowballPorterFilterFactory
|
| Modifier and Type | Method and Description |
|---|---|
TokenFilter |
create(TokenStream input)
Transform the specified input TokenStream
|
void |
inform(ResourceLoader loader)
Initializes this component with the provided ResourceLoader
(used for loading classes, files, etc).
|
availableTokenFilters, findSPIName, forName, lookupClass, normalize, reloadTokenFiltersget, get, get, get, get, getBoolean, getChar, getClassArg, getFloat, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSet, getSnowballWordSet, getWordSet, isExplicitLuceneMatchVersion, require, require, require, requireBoolean, requireChar, requireFloat, requireInt, setExplicitLuceneMatchVersion, splitAt, splitFileNamespublic static final String NAME
public static final String PROTECTED_TOKENS
public void inform(ResourceLoader loader) throws IOException
ResourceLoaderAwareinform in interface ResourceLoaderAwareIOExceptionpublic TokenFilter create(TokenStream input)
TokenFilterFactorycreate in class TokenFilterFactoryCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.