org.apache.lucene.analysis.ngram

Class NGramFilterFactory



  • public class NGramFilterFactory
    extends TokenFilterFactory
    Factory for 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>