# ElasticSearch Filter by Aggregation Result

**URL:** https://discuss.elastic.co/t/elasticsearch-filter-by-aggregation-result/25847
**Category:** Elasticsearch
**Created:** [July 18, 2015, 11:33am UTC](https://discuss.elastic.co/t/elasticsearch-filter-by-aggregation-result/25847 "2015-07-18T11:33:10Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)
#### Post date: [July 20, 2015, 6:50am UTC](https://discuss.elastic.co/t/elasticsearch-filter-by-aggregation-result/25847/2 "2015-07-20T06:50:35Z")

</div>

First to answer your actual query, in 1.4 there is nothing to filter the buckets returned by the aggregations on the client side. Coming in 2.0 with the new pipeline aggregations there is the [`bucket_selector` aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-pipeline-bucket-selector-aggregation.html) which will allow you to do this kind of filtering though.

And to your side note question, yes this is the right place to be asking all types of questions about using, developing maintaining etc. Elasticsearch. These forums are indeed fairly new but they are also pretty active.

HTH

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-filter-by-aggregation-result/25847)._
