Set terms = new HashSet();
query.extractTerms(terms);
try {
//highlight content
TokenStream tokenStream = analyzer.tokenStream(OlatDocument.CONTENT_FIELD_NAME, new StringReader(content));
String highlightResult = highlighter.getBestFragments(tokenStream, content, 3, HIGHLIGHT_SEPARATOR);
// if no highlightResult is in content => look in description
if (highlightResult.length() == 0) {
String description = doc.get(OlatDocument.DESCRIPTION_FIELD_NAME);
tokenStream = analyzer.tokenStream(OlatDocument.DESCRIPTION_FIELD_NAME, new StringReader(description));