@Override
public Query rewrite(final IndexReader reader, final SirenMultiTermQuery query) throws IOException {
<<<<<<< HEAD
// Disabled cutoffs
final int docCountCutoff = Integer.MAX_VALUE;
final int termCountLimit = Integer.MAX_VALUE;
=======
// Get the enum and start visiting terms. If we
// exhaust the enum before hitting either of the
// cutoffs, we use ConstantBooleanQueryRewrite; else,
// ConstantFilterRewrite:
// final int docCountCutoff = (int) ((docCountPercent / 100.) * reader.maxDoc());
final int docCountCutoff = Integer.MAX_VALUE;
// final int termCountLimit = Math.min(BooleanQuery.getMaxClauseCount(), termCountCutoff);
final int termCountLimit = termCountCutoff;
>>>>>>> 4ac9dc92e25f1a09ccc449b658baddc787d4123f
final CutOffTermCollector col = new CutOffTermCollector(reader, docCountCutoff, termCountLimit);
this.collectTerms(reader, query, col); |