org.apache.lucene.analysis.miscellaneous

Class LimitTokenPositionFilterFactory



  • public class LimitTokenPositionFilterFactory
    extends TokenFilterFactory
    Factory for LimitTokenPositionFilter.
     <fieldType name="text_limit_pos" class="solr.TextField" positionIncrementGap="100">
       <analyzer>
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.LimitTokenPositionFilterFactory" maxTokenPosition="3" consumeAllTokens="false" />
       </analyzer>
     </fieldType>

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