public class MorfologikFilterFactory extends TokenFilterFactory implements ResourceLoaderAware
MorfologikFilter
.
An explicit resource name of the dictionary (".dict"
) can be
provided via the dictionary
attribute, as the example below demonstrates:
<fieldType name="text_mylang" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.MorfologikFilterFactory" dictionary="mylang.dict" /> </analyzer> </fieldType>
If the dictionary attribute is not provided, the Polish dictionary is loaded and used by default.
Modifier and Type | Field and Description |
---|---|
static String |
DICTIONARY_ATTRIBUTE
Dictionary resource attribute (should have
".dict" suffix), loaded from ResourceLoader . |
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion
Constructor and Description |
---|
MorfologikFilterFactory(Map<String,String> args)
Creates a new MorfologikFilterFactory
|
Modifier and Type | Method and Description |
---|---|
TokenStream |
create(TokenStream ts)
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, 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, splitFileNames
public static final String DICTIONARY_ATTRIBUTE
".dict"
suffix), loaded from ResourceLoader
.public MorfologikFilterFactory(Map<String,String> args)
public void inform(ResourceLoader loader) throws IOException
ResourceLoaderAware
inform
in interface ResourceLoaderAware
IOException
public TokenStream create(TokenStream ts)
TokenFilterFactory
create
in class TokenFilterFactory