no need to optimize on the bool query parser, we already do that in the optimizeQuery method
This commit is contained in:
parent
3fdb9f0a27
commit
177568a61f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue