public Summary getSummary(String text, Query query) {
String[] terms = query.getTerms();
WeightedTerm[] weighted = new WeightedTerm[terms.length];
for (int i=0; i<terms.length; i++) {
weighted[i] = new WeightedTerm(1.0f, terms[i]);
}
Highlighter highlighter = new Highlighter(FORMATTER, new QueryScorer(weighted));
TokenStream tokens = analyzer.tokenStream("content", new StringReader(text));
Summary summary = new Summary();
try {