no need to optimize on the bool query parser, we already do that in the optimizeQuery method

This commit is contained in:
Shay Banon 2012-08-22 13:15:22 +02:00
parent 3fdb9f0a27
commit 177568a61f
1 changed files with 0 additions and 14 deletions

View File

@ -128,20 +128,6 @@ public class BoolQueryParser implements QueryParser {
return null;
}
if (clauses.size() == 1) {
BooleanClause clause = clauses.get(0);
if (clause.getOccur() == BooleanClause.Occur.MUST) {
Query query = clause.getQuery();
query.setBoost(boost * query.getBoost());
return query;
}
if (clause.getOccur() == BooleanClause.Occur.SHOULD && minimumNumberShouldMatch > 0) {
Query query = clause.getQuery();
query.setBoost(boost * query.getBoost());
return query;
}
}
BooleanQuery query = new BooleanQuery(disableCoord);
for (BooleanClause clause : clauses) {
query.add(clause);