RandomIndexWriter w = new RandomIndexWriter(random(), dir);
createRandomIndex(atLeast(50), w, random().nextLong());
DirectoryReader reader = w.getReader();
SlowCompositeReaderWrapper wrapper = new SlowCompositeReaderWrapper(reader);
String field = "body";
Terms terms = wrapper.terms(field);
PriorityQueue<TermAndFreq> lowFreqQueue = new PriorityQueue<CommonTermsQueryTest.TermAndFreq>(
5) {
@Override
protected boolean lessThan(TermAndFreq a, TermAndFreq b) {