org.apache.lucene.analysis.hunspell

## 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 of `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.
The parameter ignoreCase (true/false) controls whether matching is case sensitive or not. Default false.
The parameter strictAffixParsing (true/false) controls whether the affix parsing is strict or not. Default true. If strict an error while reading an affix rule causes a ParseException, otherwise is ignored.
Dictionaries for many languages are available through the OpenOffice project. See http://wiki.apache.org/solr/Hunspell

### Field Summary

### Fields inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

`args, luceneMatchVersion`

### Constructor Summary

Constructors
Constructor and Description
`HunspellStemFilterFactory()`

### Method Summary

Methods
`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

### Methods inherited from class org.apache.lucene.analysis.util.TokenFilterFactory

`availableTokenFilters, forName, lookupClass, reloadTokenFilters`

### Methods inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

`assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSnowballWordSet, getWordSet, init, setLuceneMatchVersion, splitFileNames`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HunspellStemFilterFactory

    public HunspellStemFilterFactory()

### Method Detail

#### inform

    public void inform(ResourceLoader loader)
                throws IOException

Loads the hunspell dictionary and affix files defined in the configuration

Specified by:
  `inform` in interface `ResourceLoaderAware`
Parameters:
  `loader` - ResourceLoader used to load the files
Throws:
  `IOException`

#### create

    public TokenStream create(TokenStream tokenStream)

Creates an instance of `HunspellStemFilter` that will filter the given TokenStream

Specified by:
  `create` in class `TokenFilterFactory`
Parameters:
  `tokenStream` - TokenStream that will be filtered
Returns:
  HunspellStemFilter that filters the TokenStream