# Bucket aggregation And Java client

**URL:** <https://discuss.elastic.co/t/bucket-aggregation-and-java-client/315136>\
**Category:** Elasticsearch\
**Created:** [September 26, 2022, 7:13am UTC](https://discuss.elastic.co/t/bucket-aggregation-and-java-client/315136 "2022-09-26T07:13:49Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 28, 2022, 10:00am UTC](https://discuss.elastic.co/t/bucket-aggregation-and-java-client/315136/3 "2022-09-28T10:00:02Z")

</div>

In the future please don't create multiple topics for the same questions, it makes it harder for people to help you.

> [@Convert es (Bucket aggregation) query to java](https://discuss.elastic.co/t/convert-es-bucket-aggregation-query-to-java/315321):
>
> Hi, Can anyone help me convert this query in java program and how would i get only the aggreagtion result from query. The query is given below. GET /\_search { "size": 0, "query": { "bool": { "filter": [ { "range": { "@timestamp": { "gte": 1664044200000, "lte": 1664216999000, "format": "epoch\_millis" } } }, { "query\_string": { "analyze\_wildcard": true…

---

_[View the full topic](https://discuss.elastic.co/t/bucket-aggregation-and-java-client/315136)._
