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 Stringprivate Dictionaryprivate final Stringprivate final booleanprivate final booleanstatic final StringSPI nameprivate static final Stringprivate static final Stringprivate static final Stringprivate static final StringFields 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 TokenStreamvoidinform(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, reloadTokenFiltersMethods 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:ResourceLoaderAwareInitializes this component with the provided ResourceLoader (used for loading classes, files, etc).- Specified by:
informin interfaceResourceLoaderAware- Throws:
IOException
-
create
Description copied from class:TokenFilterFactoryTransform the specified input TokenStream- Specified by:
createin classTokenFilterFactory
-