# How to do join in aggregation result

**URL:** <https://discuss.elastic.co/t/how-to-do-join-in-aggregation-result/141717>\
**Category:** Elasticsearch\
**Created:** [July 26, 2018, 8:32am UTC](https://discuss.elastic.co/t/how-to-do-join-in-aggregation-result/141717 "2018-07-26T08:32:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool\_arun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cool_arun/32/70465_2.png) [@cool\_arun](https://discuss.elastic.co/u/cool_arun)\
**Post date:** [July 26, 2018, 8:32am UTC](https://discuss.elastic.co/t/how-to-do-join-in-aggregation-result/141717/1 "2018-07-26T08:32:41Z")

</div>

I perform aggregation query that return result like this one  
{  
aggregation : {  
top\_books : {  
buckets: [  
{  
key: "book-543',  
doc\_count: 20  
}  
.....  
]  
}  
}

```
      }

```

Now i want all the details for the key "book-543"

How to do this.

---

<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:** [August 23, 2018, 8:32am UTC](https://discuss.elastic.co/t/how-to-do-join-in-aggregation-result/141717/2 "2018-08-23T08:32:45Z")

</div>

Closed on August 23, 2018, 8:32am UTC

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