/    /  Solr – Filters

Solr – Filters:

In this tutorial, we will learn about the filters in Solr which another important concept. As how the tokenizers work, the same way filters take the data stream and produce the filtered data. Its main job is to create another simplified token stream.


<fieldType name="text" class="solr.TextField">


    <tokenizer class="solr.StandardTokenizerFactory"/>

    <filter class="solr.StandardFilterFactory"/>

    <filter class="solr.LowerCaseFilterFactory"/>

    <filter class="solr.EnglishPorterFilterFactory"/>



In the above example, standard tokenizer will first break the text and pass it over to filter, where the standard filter removes the dots and other operations which finally facilitate the querying text as easy and case-insensitive.

If you can observe, there is something called porter filter which actually uses the porter stemming algorithm. This works as if you have the words like “run”, “running”, “runs” will be replaced with a stem word “run” and where “ruin” will not match.

Below is the list of Filters:

  • ASCII Folding Filter
  • Beider-Morse Filter
  • Classic Filter
  • Common Grams Filter
  • Collation Key Filter
  • Daitch-Mokotoff Soundex Filter
  • Double Metaphone Filter
  • Edge N-Gram Filter
  • English Minimal Stem Filter
  • English Possessive Filter
  • Fingerprint Filter
  • Flatten Graph Filter
  • Hunspell Stem Filter
  • Hyphenated Words Filter
  • ICU Folding Filter
  • ICU Normalizer 2 Filter
  • ICU Transform Filter
  • Keep Word Filter
  • KStem Filter
  • Length Filter
  • Limit Token Count Filter
  • Limit Token Offset Filter
  • Limit Token Position Filter
  • Lower Case Filter
  • Managed Stop Filter
  • Managed Synonym Filter
  • N-Gram Filter
  • Numeric Payload Token Filter
  • Pattern Replace Filter
  • Phonetic Filter
  • Porter Stem Filter
  • Remove Duplicates Token Filter
  • Reversed Wildcard Filter
  • Shingle Filter
  • Snowball Porter Stemmer Filter
  • Standard Filter
  • Stop Filter
  • Suggest Stop Filter
  • Synonym Filter
  • Synonym Graph Filter
  • Token Offset Payload Filter
  • Trim Filter
  • Type As Payload Filter
  • Type Token Filter
  • Word Delimiter Filter
  • Word Delimiter Graph Filter

Below is the list of Filter Factories:

  • MappingCharFilterFactory
  • HTMLStripCharFilterFactory
  • ICUNormalizer2CharFilterFactory
  • PatternReplaceCharFilterFactory