# Query in rated requests should not contain aggregations

**URL:** <https://discuss.elastic.co/t/query-in-rated-requests-should-not-contain-aggregations/324559>\
**Category:** Elasticsearch\
**Created:** [February 2, 2023, 2:51pm UTC](https://discuss.elastic.co/t/query-in-rated-requests-should-not-contain-aggregations/324559 "2023-02-02T14:51:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ocastaneda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ocastaneda/32/107727_2.png) [@ocastaneda](https://discuss.elastic.co/u/ocastaneda)\
**Post date:** [February 2, 2023, 2:51pm UTC](https://discuss.elastic.co/t/query-in-rated-requests-should-not-contain-aggregations/324559/1 "2023-02-02T14:51:07Z")

</div>

Hello!

Our search team is considering diversifying search results with **diversified\_sampler** aggregation and child **top\_hits** aggregation. I noticed that aggregations don’t work with the **ranking evaluation API**. Anyone got some workarounds/tips? I guess one workaround would be just to run regular search API calls and evaluate the aggregation results without relying on ES ranking evaluation API. But hoping there’s an easier/out-of-box solution.

---

<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:** [March 2, 2023, 2:51pm UTC](https://discuss.elastic.co/t/query-in-rated-requests-should-not-contain-aggregations/324559/2 "2023-03-02T14:51:15Z")

</div>

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