WordReader wordReader = document.wordReader(fieldIndex);
wordReader.setReader(reader);
MutableString word = new MutableString();
MutableString nonWord = new MutableString();
final LongRBTreeSet set = new LongRBTreeSet();
while (wordReader.next(word, nonWord)) {
if (processor.processTerm(word)) {
long termId = index.getTermId(word);
if (termId >= 0)
if (set.add(termId))
relFreq
.put(termId,
relFreq.get(termId) + 1);
}
}