Web / Apache Solr Interview questions
What is a filter in the Solr analysis chain?
A token filter runs after the tokenizer and transforms the token stream it receives, either by modifying tokens, adding new ones, or dropping some entirely. An analyzer can chain many filters in sequence.
Frequently used filters include:
- LowerCaseFilter - normalizes case so "Apple" matches "apple".
- StopFilter - removes common words like "the" or "and".
- SynonymGraphFilter - expands terms to include synonyms.
- PorterStemFilter - reduces words to a root form, so "running" becomes "run".
Because filters run in order, sequence matters: lowercasing before stemming, for example, avoids case-sensitive mismatches in the stemmed output.
More Related questions...