# Random top hits from each bucket

**URL:** <https://discuss.elastic.co/t/random-top-hits-from-each-bucket/197358>\
**Category:** Elasticsearch\
**Created:** [August 29, 2019, 2:20pm UTC](https://discuss.elastic.co/t/random-top-hits-from-each-bucket/197358 "2019-08-29T14:20:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gag\_Gag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gag_gag/32/47827_2.png) [@Gag\_Gag](https://discuss.elastic.co/u/Gag_Gag)\
**Post date:** [August 29, 2019, 2:20pm UTC](https://discuss.elastic.co/t/random-top-hits-from-each-bucket/197358/1 "2019-08-29T14:20:43Z")

</div>

I have a histogram bucket and when I put a top hits sub aggregation, I see the same results.

Is there a way to make it randomly return results from each bucket?

 ![15670884165332779407475516538669](https://us1.discourse-cdn.com/elastic/original/3X/0/3/035f132824503b42b7adfd94dea0561a5bd3fc4d.jpeg)

---

<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:** [September 26, 2019, 2:20pm UTC](https://discuss.elastic.co/t/random-top-hits-from-each-bucket/197358/2 "2019-09-26T14:20:44Z")

</div>

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