public class HunspellStemFilterFactory extends TokenFilterFactory implements ResourceLoaderAware
HunspellStemFilter
.
Example config for British English including a custom dictionary, case insensitive matching:
<filter class="solr.HunspellStemFilterFactory" dictionary="en_GB.dic,my_custom.dic" affix="en_GB.aff" ignoreCase="true" />Both parameters dictionary and affix are mandatory.
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion
Constructor and Description |
---|
HunspellStemFilterFactory(Map<String,String> args)
Creates a new HunspellStemFilterFactory
|
Modifier and Type | Method and Description |
---|---|
TokenStream |
create(TokenStream tokenStream)
Creates an instance of
HunspellStemFilter that will filter the given
TokenStream |
void |
inform(ResourceLoader loader)
Loads the hunspell dictionary and affix files defined in the configuration
|
availableTokenFilters, forName, lookupClass, reloadTokenFilters
assureMatchVersion, get, 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, splitFileNames
public void inform(ResourceLoader loader) throws IOException
inform
in interface ResourceLoaderAware
loader
- ResourceLoader used to load the filesIOException
public TokenStream create(TokenStream tokenStream)
HunspellStemFilter
that will filter the given
TokenStreamcreate
in class TokenFilterFactory
tokenStream
- TokenStream that will be filteredCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.