NOTE: if this would exceed the array size, this method creates a new reference array.
111112113114115116117118119120121
continue; // for duplicate suggestions, the best weight is actually // added } Util.toIntsRef(scratch, scratchInts); builder.add(scratchInts, cost); previous.copyBytes(scratch); } fst = builder.finish(); }
576577578579580581582583584585586
while (true) { try { BytesRef term = termsEnum.next(); if (term != null) { BytesRef text = new BytesRef(); text.copyBytes(term); TermStats ts = new TermStats(); ts.field(field).text(text).docFreq(termsEnum.docFreq()); tiq.insertWithOverflow(ts); } else { break;