public class NGramFilterFactory extends BaseTokenFilterFactory
NGramTokenFilter.
<fieldType name="text_ngrm" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="1" maxGramSize="2"/>
</analyzer>
</fieldType>| Modifier and Type | Field and Description |
|---|---|
private int |
maxGramSize |
private int |
minGramSize |
logargs, luceneMatchVersion| Constructor and Description |
|---|
NGramFilterFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.analysis.ngram.NGramTokenFilter |
create(org.apache.lucene.analysis.TokenStream input)
Transform the specified input TokenStream
|
void |
init(java.util.Map<java.lang.String,java.lang.String> args)
Initialize the n-gram min and max sizes and the side from which one should start tokenizing.
|
assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getSnowballWordSet, getWordSet, warnDeprecatedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArgspublic void init(java.util.Map<java.lang.String,java.lang.String> args)
init in interface TokenFilterFactoryinit in class BaseTokenStreamFactorypublic org.apache.lucene.analysis.ngram.NGramTokenFilter create(org.apache.lucene.analysis.TokenStream input)
TokenFilterFactory