Class TruncateTokenFilterFactory


  • public class TruncateTokenFilterFactory
    extends TokenFilterFactory
    Factory for TruncateTokenFilter. The following type is recommended for "diacritics-insensitive search" for Turkish.
     <fieldType name="text_tr_ascii_f5" class="solr.TextField" positionIncrementGap="100">
       <analyzer>
         <tokenizer class="solr.StandardTokenizerFactory"/>
         <filter class="solr.ApostropheFilterFactory"/>
         <filter class="solr.TurkishLowerCaseFilterFactory"/>
         <filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="true"/>
         <filter class="solr.KeywordRepeatFilterFactory"/>
         <filter class="solr.TruncateTokenFilterFactory" prefixLength="5"/>
         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
       </analyzer>
     </fieldType>
    Since:
    4.8.0
    SPI Name (case-insensitive: if the name is 'htmlStrip', 'htmlstrip' can be used when looking up the service).
    "truncate"