TermsEnum termsEnum = terms.iterator(null);
BytesRef text;
DocsAndPositionsEnum docsAndPositions = null;
List<BoboTerm> boboTermList = new ArrayList<BoboTerm>();
while ((text = termsEnum.next()) != null) {
BoboTerm boboTerm = new BoboTerm();
boboTerm.term = text.utf8ToString();
boboTerm.freq = (int) termsEnum.totalTermFreq();
docsAndPositions = termsEnum.docsAndPositions(null, docsAndPositions);
if (docsAndPositions != null) {
docsAndPositions.nextDoc();