The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
Highlighting search terms.
This package contains several components useful to build a highlighter on top of the
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis.
Another highlighter implementation based on term vectors.