# Bucket search results by score

**URL:** <https://discuss.elastic.co/t/bucket-search-results-by-score/72659>\
**Category:** Elasticsearch\
**Created:** [January 24, 2017, 3:30pm UTC](https://discuss.elastic.co/t/bucket-search-results-by-score/72659 "2017-01-24T15:30:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devj1988](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devj1988/32/30628_2.png) [@devj1988](https://discuss.elastic.co/u/devj1988)\
**Post date:** [January 24, 2017, 3:30pm UTC](https://discuss.elastic.co/t/bucket-search-results-by-score/72659/1 "2017-01-24T15:30:34Z")

</div>

Hi,

I have a problem where I need to get a result set, sort it by score and then bucket results by score.

There is no in-built aggregation for it. I have trying to use the scripting mechanism with \_score, but so far I have not succeeded.

Can someone please give me some hints/suggestions?

-Dev

---

<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:** [February 21, 2017, 3:30pm UTC](https://discuss.elastic.co/t/bucket-search-results-by-score/72659/2 "2017-02-21T15:30:41Z")

</div>

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