public class HunspellStemFilterFactory extends TokenFilterFactory implements ResourceLoaderAware
HunspellStemFilter
.
Example config for British English:
<filter class="solr.HunspellStemFilterFactory" dictionary="en_GB.dic,my_custom.dic" affix="en_GB.aff" ignoreCase="false" longestOnly="false" />Both parameters dictionary and affix are mandatory. Dictionaries for many languages are available through the OpenOffice project. See http://wiki.apache.org/solr/Hunspell
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
affixFile |
private Dictionary |
dictionary |
private java.lang.String |
dictionaryFiles |
private boolean |
ignoreCase |
private boolean |
longestOnly |
private static java.lang.String |
PARAM_AFFIX |
private static java.lang.String |
PARAM_DICTIONARY |
private static java.lang.String |
PARAM_IGNORE_CASE |
private static java.lang.String |
PARAM_LONGEST_ONLY |
private static java.lang.String |
PARAM_RECURSION_CAP |
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion
Constructor and Description |
---|
HunspellStemFilterFactory(java.util.Map<java.lang.String,java.lang.String> args)
Creates a new HunspellStemFilterFactory
|
Modifier and Type | Method and Description |
---|---|
TokenStream |
create(TokenStream tokenStream)
Transform the specified input TokenStream
|
void |
inform(ResourceLoader loader)
Initializes this component with the provided ResourceLoader
(used for loading classes, files, etc).
|
availableTokenFilters, forName, lookupClass, normalize, reloadTokenFilters
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, splitAt, splitFileNames
private static final java.lang.String PARAM_DICTIONARY
private static final java.lang.String PARAM_AFFIX
private static final java.lang.String PARAM_RECURSION_CAP
private static final java.lang.String PARAM_IGNORE_CASE
private static final java.lang.String PARAM_LONGEST_ONLY
private final java.lang.String dictionaryFiles
private final java.lang.String affixFile
private final boolean ignoreCase
private final boolean longestOnly
private Dictionary dictionary
public HunspellStemFilterFactory(java.util.Map<java.lang.String,java.lang.String> args)
public void inform(ResourceLoader loader) throws java.io.IOException
ResourceLoaderAware
inform
in interface ResourceLoaderAware
java.io.IOException
public TokenStream create(TokenStream tokenStream)
TokenFilterFactory
create
in class TokenFilterFactory