public class DictionaryCompoundWordTokenFilterFactory extends BaseTokenFilterFactory implements ResourceLoaderAware
DictionaryCompoundWordTokenFilter.
<fieldType name="text_dictcomp" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.DictionaryCompoundWordTokenFilterFactory" dictionary="dictionary.txt"
minWordSize="5" minSubwordSize="2" maxSubwordSize="15" onlyLongestMatch="true"/>
</analyzer>
</fieldType>| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
dictFile |
private org.apache.lucene.analysis.CharArraySet |
dictionary |
private int |
maxSubwordSize |
private int |
minSubwordSize |
private int |
minWordSize |
private boolean |
onlyLongestMatch |
logargs, luceneMatchVersion| Constructor and Description |
|---|
DictionaryCompoundWordTokenFilterFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter |
create(org.apache.lucene.analysis.TokenStream input)
Transform the specified input TokenStream
|
void |
inform(ResourceLoader loader) |
void |
init(java.util.Map<java.lang.String,java.lang.String> args)
init will be called just once, immediately after creation. |
assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getSnowballWordSet, getWordSet, warnDeprecatedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArgsprivate org.apache.lucene.analysis.CharArraySet dictionary
private java.lang.String dictFile
private int minWordSize
private int minSubwordSize
private int maxSubwordSize
private boolean onlyLongestMatch
public DictionaryCompoundWordTokenFilterFactory()
public void init(java.util.Map<java.lang.String,java.lang.String> args)
TokenFilterFactoryinit will be called just once, immediately after creation.
The args are user-level initialization parameters that may be specified when declaring the factory in the schema.xml
init in interface TokenFilterFactoryinit in class BaseTokenStreamFactorypublic void inform(ResourceLoader loader)
inform in interface ResourceLoaderAwarepublic org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter create(org.apache.lucene.analysis.TokenStream input)
TokenFilterFactorycreate in interface TokenFilterFactory