# Aggregate percolated queries by geobounds filter value

**URL:** <https://discuss.elastic.co/t/aggregate-percolated-queries-by-geobounds-filter-value/41043>\
**Category:** Elasticsearch\
**Created:** [February 5, 2016, 10:07am UTC](https://discuss.elastic.co/t/aggregate-percolated-queries-by-geobounds-filter-value/41043 "2016-02-05T10:07:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbenoit2011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbenoit2011/32/7601_2.png) [@jbenoit2011](https://discuss.elastic.co/u/jbenoit2011)\
**Post date:** [February 5, 2016, 10:07am UTC](https://discuss.elastic.co/t/aggregate-percolated-queries-by-geobounds-filter-value/41043/1 "2016-02-05T10:07:38Z")

</div>

Hello everyone,

I percolated thousands of queries, all with a geobounds filter. For some of them, the value of the filter are the same, only other parts of query are different.  
In order to compute stats, I would like to aggregate these queries by geobounds filter value.

The response I wish, looks like this:

```auto
{
[bucket 1 containing all queries which have geobounds filter with value X],
[bucket 2 containing all queries which have geobounds filter with value Y],
[bucket 3 containing all queries which have geobounds filter with value Z],
... and so on
}

```

I looked at the geobounds aggregation, but I think it's not what I want since it is a single value aggregation.  
I tried the terms aggregation, but it only works on string and numeric fields.

Elasticsearch version I use is 1.5.

Any ideas?

Thank you.

Julien.

---

<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:** [July 5, 2017, 11:18pm UTC](https://discuss.elastic.co/t/aggregate-percolated-queries-by-geobounds-filter-value/41043/2 "2017-07-05T23:18:38Z")

</div>


