Class HunspellStemFilterFactory
- java.lang.Object
-
- org.apache.lucene.analysis.util.AbstractAnalysisFactory
-
- org.apache.lucene.analysis.util.TokenFilterFactory
-
- org.apache.lucene.analysis.hunspell.HunspellStemFilterFactory
-
- All Implemented Interfaces:
ResourceLoaderAware
public class HunspellStemFilterFactory extends TokenFilterFactory implements ResourceLoaderAware
TokenFilterFactory that creates instances ofHunspellStemFilter. 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- Since:
- 3.5.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringaffixFileprivate Dictionarydictionaryprivate java.lang.StringdictionaryFilesprivate booleanignoreCaseprivate booleanlongestOnlystatic java.lang.StringNAMESPI nameprivate static java.lang.StringPARAM_AFFIXprivate static java.lang.StringPARAM_DICTIONARYprivate static java.lang.StringPARAM_IGNORE_CASEprivate static java.lang.StringPARAM_LONGEST_ONLYprivate static java.lang.StringPARAM_RECURSION_CAP-
Fields inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion
-
-
Constructor Summary
Constructors Constructor Description HunspellStemFilterFactory(java.util.Map<java.lang.String,java.lang.String> args)Creates a new HunspellStemFilterFactory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenStreamcreate(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.util.TokenFilterFactory
availableTokenFilters, findSPIName, forName, lookupClass, normalize, reloadTokenFilters
-
Methods inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory
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 Detail
-
NAME
public static final java.lang.String NAME
SPI name- See Also:
- Constant Field Values
-
PARAM_DICTIONARY
private static final java.lang.String PARAM_DICTIONARY
- See Also:
- Constant Field Values
-
PARAM_AFFIX
private static final java.lang.String PARAM_AFFIX
- See Also:
- Constant Field Values
-
PARAM_RECURSION_CAP
private static final java.lang.String PARAM_RECURSION_CAP
- See Also:
- Constant Field Values
-
PARAM_IGNORE_CASE
private static final java.lang.String PARAM_IGNORE_CASE
- See Also:
- Constant Field Values
-
PARAM_LONGEST_ONLY
private static final java.lang.String PARAM_LONGEST_ONLY
- See Also:
- Constant Field Values
-
dictionaryFiles
private final java.lang.String dictionaryFiles
-
affixFile
private final java.lang.String affixFile
-
ignoreCase
private final boolean ignoreCase
-
longestOnly
private final boolean longestOnly
-
dictionary
private Dictionary dictionary
-
-
Method Detail
-
inform
public void inform(ResourceLoader loader) throws java.io.IOException
Description copied from interface:ResourceLoaderAwareInitializes this component with the provided ResourceLoader (used for loading classes, files, etc).- Specified by:
informin interfaceResourceLoaderAware- Throws:
java.io.IOException
-
create
public TokenStream create(TokenStream tokenStream)
Description copied from class:TokenFilterFactoryTransform the specified input TokenStream- Specified by:
createin classTokenFilterFactory
-
-