public void highlightHitDocument(int index) throws RegainException {
try {
IndexSearcherManager manager = IndexSearcherManager.getInstance(mIndexConfig.getDirectory());
// The highlighter needs a rewritten query to work with wildcard and fuzzy queries
Query rewrittenQuery = manager.rewrite(mQuery);
QueryScorer queryScorer = new QueryScorer(rewrittenQuery);
// End added by Anders
Highlighter highlighter = new Highlighter(
new SimpleHTMLFormatter("<span class=\"highlight\">", "</span>"), queryScorer);