Permalink
Browse files

no need to optimize on the bool query parser, we already do that in t…

…he optimizeQuery method
  • Loading branch information...
1 parent 3fdb9f0 commit 177568a61f77f13e618c04154c87bf26c5af8bd6 @kimchy kimchy committed Aug 22, 2012
Showing with 0 additions and 14 deletions.
  1. +0 −14 src/main/java/org/elasticsearch/index/query/BoolQueryParser.java
View
14 src/main/java/org/elasticsearch/index/query/BoolQueryParser.java
@@ -128,20 +128,6 @@ public Query parse(QueryParseContext parseContext) throws IOException, QueryPars
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);

0 comments on commit 177568a

Please sign in to comment.