public class KeepWordFilterFactory extends TokenFilterFactory implements ResourceLoaderAware
KeepWordFilter.
<fieldType name="text_keepword" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.KeepWordFilterFactory" words="keepwords.txt" ignoreCase="false" enablePositionIncrements="false"/>
</analyzer>
</fieldType>args, luceneMatchVersion| Constructor and Description |
|---|
KeepWordFilterFactory() |
| Modifier and Type | Method and Description |
|---|---|
TokenStream |
create(TokenStream input)
Transform the specified input TokenStream
|
CharArraySet |
getWords() |
void |
inform(ResourceLoader loader)
Initializes this component with the provided ResourceLoader
(used for loading classes, files, etc).
|
void |
init(Map<String,String> args)
Initialize this factory via a set of key-value pairs.
|
boolean |
isEnablePositionIncrements() |
boolean |
isIgnoreCase() |
void |
setIgnoreCase(boolean ignoreCase) |
void |
setWords(Set<String> words)
Set the keep word list.
|
availableTokenFilters, forName, lookupClass, reloadTokenFiltersassureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getLines, getLuceneMatchVersion, getPattern, getSnowballWordSet, getWordSet, setLuceneMatchVersion, splitFileNamespublic void init(Map<String,String> args)
AbstractAnalysisFactoryinit in class AbstractAnalysisFactorypublic void inform(ResourceLoader loader) throws IOException
ResourceLoaderAwareinform in interface ResourceLoaderAwareIOExceptionpublic void setWords(Set<String> words)
public void setIgnoreCase(boolean ignoreCase)
public boolean isEnablePositionIncrements()
public boolean isIgnoreCase()
public CharArraySet getWords()
public TokenStream create(TokenStream input)
TokenFilterFactorycreate in class TokenFilterFactoryCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.