public class NGramTokenizerFactory extends BaseTokenizerFactory
NGramTokenizer
.
<fieldType name="text_ngrm" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.NGramTokenizerFactory" minGramSize="1" maxGramSize="2"/> </analyzer> </fieldType>
Modifier and Type | Field and Description |
---|---|
private int |
maxGramSize |
private int |
minGramSize |
log
args, luceneMatchVersion
Constructor and Description |
---|
NGramTokenizerFactory() |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.analysis.ngram.NGramTokenizer |
create(java.io.Reader input)
Creates the
TokenStream of n-grams from the given Reader . |
void |
init(java.util.Map<java.lang.String,java.lang.String> args)
Initializes 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, warnDeprecated
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArgs
public void init(java.util.Map<java.lang.String,java.lang.String> args)
init
in interface TokenizerFactory
init
in class BaseTokenStreamFactory
public org.apache.lucene.analysis.ngram.NGramTokenizer create(java.io.Reader input)
TokenStream
of n-grams from the given Reader
.