# Why Composite Aggregation In Java make getBuckets() not public while another agg type is public

**URL:** <https://discuss.elastic.co/t/why-composite-aggregation-in-java-make-getbuckets-not-public-while-another-agg-type-is-public/225997>\
**Category:** Elasticsearch\
**Created:** [April 1, 2020, 7:41am UTC](https://discuss.elastic.co/t/why-composite-aggregation-in-java-make-getbuckets-not-public-while-another-agg-type-is-public/225997 "2020-04-01T07:41:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hi\_u\_Nguy\_n](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hi_u_nguy_n/32/65457_2.png) [@Hi\_u\_Nguy\_n](https://discuss.elastic.co/u/Hi_u_Nguy_n)\
**Post date:** [April 1, 2020, 7:41am UTC](https://discuss.elastic.co/t/why-composite-aggregation-in-java-make-getbuckets-not-public-while-another-agg-type-is-public/225997/1 "2020-04-01T07:41:31Z")

</div>

Why Composite Aggregation In Java make InternalBucket not public ?  
So, I can't get buckets for my purporse ??

The class InternalBucket inside InternalComposite class (Result Aggration of the CompositeAggragation query using ElasticSearchTemplate)

And, have any way to retrieve the buckets of results ?  
Thanks all.

---

<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:** [April 29, 2020, 7:41am UTC](https://discuss.elastic.co/t/why-composite-aggregation-in-java-make-getbuckets-not-public-while-another-agg-type-is-public/225997/2 "2020-04-29T07:41:47Z")

</div>

Closed on April 29, 2020, 7:41am UTC

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