Class NGramTokenizerFactory
Factory for NGramTokenizer.
<fieldType name="text_ngrm" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.NGramTokenizerFactory" minGramSize="1" maxGramSize="2"/>
</analyzer>
</fieldType>
Inherited Members
Namespace: Lucene.Net.Analysis.NGram
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public class NGramTokenizerFactory : TokenizerFactory
Constructors
NGramTokenizerFactory(IDictionary<string, string>)
Creates a new NGramTokenizerFactory
Declaration
public NGramTokenizerFactory(IDictionary<string, string> args)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary<string, string> | args |
Methods
Create(AttributeFactory, TextReader)
Creates the Lucene.Net.Analysis.TokenStream of n-grams from the given TextReader and Lucene.Net.Util.AttributeSource.AttributeFactory.
Declaration
public override Tokenizer Create(AttributeSource.AttributeFactory factory, TextReader input)
Parameters
| Type | Name | Description |
|---|---|---|
| AttributeSource.AttributeFactory | factory | |
| TextReader | input |
Returns
| Type | Description |
|---|---|
| Tokenizer |