Web / Apache Lucene Interview questions
List common built-in Analyzers in Lucene?
Lucene ships several ready-made Analyzers so common tokenization needs don't require assembling a custom chain:
| Analyzer | Behavior |
| StandardAnalyzer | Unicode word splitting, lowercasing, English stopword removal. |
| WhitespaceAnalyzer | Splits only on whitespace, no lowercasing or stopwords. |
| SimpleAnalyzer | Splits on non-letters and lowercases; no stopword removal. |
| KeywordAnalyzer | Treats the whole field value as a single token. |
| EnglishAnalyzer | Adds English-specific stemming on top of standard tokenization. |
Most teams start with StandardAnalyzer for prose fields and KeywordAnalyzer for identifier-style fields, then swap in a language-specific or custom Analyzer only once a concrete gap shows up.
More Related questions...