.getTermMap().size());
for (Map.Entry<String, List<Term>> entry : termsResponse.getTermMap().entrySet()) {
List<TermsFieldEntry> terms = new ArrayList<TermsFieldEntry>(entry.getValue().size());
for (Term term : entry.getValue()) {
SimpleTermsFieldEntry termsEntry = new SimpleTermsFieldEntry(term.getTerm(), term.getFrequency());
termsEntry.setField(entry.getKey());
terms.add(termsEntry);
}
result.put(entry.getKey(), terms);
}