# Unable to use new multi\_terms aggregation via Java Client

**URL:** <https://discuss.elastic.co/t/unable-to-use-new-multi-terms-aggregation-via-java-client/277050>\
**Category:** Elasticsearch\
**Created:** [June 25, 2021, 11:19am UTC](https://discuss.elastic.co/t/unable-to-use-new-multi-terms-aggregation-via-java-client/277050 "2021-06-25T11:19:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IliaIsakhin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iliaisakhin/32/75238_2.png) [@IliaIsakhin](https://discuss.elastic.co/u/IliaIsakhin)\
**Post date:** [June 25, 2021, 11:19am UTC](https://discuss.elastic.co/t/unable-to-use-new-multi-terms-aggregation-via-java-client/277050/1 "2021-06-25T11:19:00Z")

</div>

Hello!

I`ve updated my ES cluster to the version 7.12 to use brand new [multi-terms aggregations](https://github.com/elastic/elasticsearch/pull/67597) I want to do something like this in my Java Rest Client

```auto
AggregationBuilders.multiTerms(field)

```

But as i see, there is no builder for muilti terms. I`ve found it in [sources on GitHub](https://github.com/elastic/elasticsearch/blob/7.12/x-pack/plugin/analytics/src/main/java/org/elasticsearch/xpack/analytics/multiterms/MultiTermsAggregationBuilder.java) As i understood, this class is externalized into some x-pack plugin and i cant get access to it. Should i add this plugin to my classpath? And where i can find it?

Thank you

---

<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:** [July 23, 2021, 11:19am UTC](https://discuss.elastic.co/t/unable-to-use-new-multi-terms-aggregation-via-java-client/277050/2 "2021-07-23T11:19:10Z")

</div>

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