# \[Java\] new equivalent of boolQuery.hasClauses() in ES 8 Java client?

**URL:** <https://discuss.elastic.co/t/java-new-equivalent-of-boolquery-hasclauses-in-es-8-java-client/319485>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [November 21, 2022, 5:44pm UTC](https://discuss.elastic.co/t/java-new-equivalent-of-boolquery-hasclauses-in-es-8-java-client/319485 "2022-11-21T17:44:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![toto12214](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toto12214/32/102728_2.png) [@toto12214](https://discuss.elastic.co/u/toto12214)\
**Post date:** [November 21, 2022, 5:44pm UTC](https://discuss.elastic.co/t/java-new-equivalent-of-boolquery-hasclauses-in-es-8-java-client/319485/1 "2022-11-21T17:44:59Z")

</div>

Hello,

I'm looking for the new equivalent of the old [BoolQueryBuilder.hasClauses()](https://www.javadoc.io/doc/org.elasticsearch/elasticsearch/6.0.1/org/elasticsearch/index/query/BoolQueryBuilder.html#hasClauses--) for Elasticsearch 8 Java client.

It seems to [have completely dissapear](https://artifacts.elastic.co/javadoc/co/elastic/clients/elasticsearch-java/8.5.0/co/elastic/clients/elasticsearch/_types/query_dsl/BoolQuery.Builder.html) ? Any workaround about ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 19, 2022, 5:45pm UTC](https://discuss.elastic.co/t/java-new-equivalent-of-boolquery-hasclauses-in-es-8-java-client/319485/2 "2022-12-19T17:45:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
