Class LimitTokenCountFilterFactory


  • public class LimitTokenCountFilterFactory
    extends TokenFilterFactory
    Factory for LimitTokenCountFilter.
     <fieldType name="text_lngthcnt" class="solr.TextField" positionIncrementGap="100">
       <analyzer>
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10" consumeAllTokens="false" />
       </analyzer>
     </fieldType>

    The consumeAllTokens property is optional and defaults to false. See LimitTokenCountFilter for an explanation of its use.

    Since:
    3.1.0
    SPI Name (case-insensitive: if the name is 'htmlStrip', 'htmlstrip' can be used when looking up the service).
    "limitTokenCount"