Class HunspellStemFilterFactory
java.lang.Object
org.apache.lucene.analysis.AbstractAnalysisFactory
org.apache.lucene.analysis.TokenFilterFactory
org.apache.lucene.analysis.hunspell.HunspellStemFilterFactory
- All Implemented Interfaces:
ResourceLoaderAware
TokenFilterFactory that creates instances of
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.
- Since:
- 3.5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private Dictionary
private final String
private final boolean
private final boolean
static final String
SPI nameprivate static final String
private static final String
private static final String
private static final String
Fields inherited from class org.apache.lucene.analysis.AbstractAnalysisFactory
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion
-
Constructor Summary
ConstructorsConstructorDescriptionDefault ctor for compatibility with SPIHunspellStemFilterFactory
(Map<String, String> args) Creates a new HunspellStemFilterFactory -
Method Summary
Modifier and TypeMethodDescriptioncreate
(TokenStream tokenStream) Transform the specified input TokenStreamvoid
inform
(ResourceLoader loader) Initializes this component with the provided ResourceLoader (used for loading classes, files, etc).Methods inherited from class org.apache.lucene.analysis.TokenFilterFactory
availableTokenFilters, findSPIName, forName, lookupClass, normalize, reloadTokenFilters
Methods inherited from class org.apache.lucene.analysis.AbstractAnalysisFactory
defaultCtorException, 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
-
Field Details
-
NAME
SPI name- See Also:
-
PARAM_DICTIONARY
- See Also:
-
PARAM_AFFIX
- See Also:
-
PARAM_IGNORE_CASE
- See Also:
-
PARAM_LONGEST_ONLY
- See Also:
-
dictionaryFiles
-
affixFile
-
ignoreCase
private final boolean ignoreCase -
longestOnly
private final boolean longestOnly -
dictionary
-
-
Constructor Details
-
HunspellStemFilterFactory
Creates a new HunspellStemFilterFactory -
HunspellStemFilterFactory
public HunspellStemFilterFactory()Default ctor for compatibility with SPI
-
-
Method Details
-
inform
Description copied from interface:ResourceLoaderAware
Initializes this component with the provided ResourceLoader (used for loading classes, files, etc).- Specified by:
inform
in interfaceResourceLoaderAware
- Throws:
IOException
-
create
Description copied from class:TokenFilterFactory
Transform the specified input TokenStream- Specified by:
create
in classTokenFilterFactory
-