TermAttribute termAtt = (TermAttribute) result
.addAttribute(TermAttribute.class);
StringBuilder buf = new StringBuilder();
try {
while (result.incrementToken()) {
String word = new String(termAtt.termBuffer(), 0, termAtt
.termLength());
buf.append(filter.encode(word)).append(" ");
}