diff --git a/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java index 56cee6e38fc..c3776673101 100644 --- a/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java @@ -133,11 +133,11 @@ public class BoolQueryBuilder extends QueryBuilder implements BoostableQueryBuil } /** - * Returns true iff this query builder has at least one should, must or mustNot clause. + * Returns true iff this query builder has at least one should, must, must not or filter clause. * Otherwise false. */ public boolean hasClauses() { - return !(mustClauses.isEmpty() && shouldClauses.isEmpty() && mustNotClauses.isEmpty()); + return !(mustClauses.isEmpty() && shouldClauses.isEmpty() && mustNotClauses.isEmpty() && filterClauses.isEmpty()); } /**