Closed
Description
Description
Hi!
As discussed here, we used to have hasClauses()
method in BoolQueryBuilder
class in the elastic client version 6.8.10 and we were using this method as part of our query building logic. But it is missing in the version 8.1.3.
We can still have the method in a newer version (8.1.3+) not in the builder since they are immutable, but in BoolQuery
class.
That way we wouldn't have to do something like:
boolean hasClauses(BoolQuery boolQuery) {
return !boolQuery.must().isEmpty()
|| !boolQuery.mustNot().isEmpty()
|| !boolQuery.should().isEmpty()
|| !boolQuery.filter().isEmpty();
}