BoboTerm boboTerm = new BoboTerm();
boboTerm.term = text.utf8ToString();
boboTerm.freq = (int) termsEnum.totalTermFreq();
docsAndPositions = termsEnum.docsAndPositions(null, docsAndPositions);
if (docsAndPositions != null) {
docsAndPositions.nextDoc();
boboTerm.positions = new ArrayList<Integer>();
boboTerm.startOffsets = new ArrayList<Integer>();
boboTerm.endOffsets = new ArrayList<Integer>();
for (int t = 0; t < boboTerm.freq; ++t) {
boboTerm.positions.add(docsAndPositions.nextPosition());