# Nested Aggregations in chain

**URL:** <https://discuss.elastic.co/t/nested-aggregations-in-chain/43133>\
**Category:** Elasticsearch\
**Created:** [March 1, 2016, 4:31pm UTC](https://discuss.elastic.co/t/nested-aggregations-in-chain/43133 "2016-03-01T16:31:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![renego](https://avatars.discourse-cdn.com/v4/letter/r/c37758/32.png) [@renego](https://discuss.elastic.co/u/renego)\
**Post date:** [March 1, 2016, 4:31pm UTC](https://discuss.elastic.co/t/nested-aggregations-in-chain/43133/1 "2016-03-01T16:31:05Z")

</div>

Hi, I am using ElasticSearch since 3 years. Now we have updated our system and become the new one 2.2, where there are a lot of changes.

I have rebuild the most of them, but one very importand thing is the aggregation/facets of my project.

I have a job search engine and I am searching for jobs + in the most of the cases. Also there are some filter like job\_type, benefits etc. Thats why I need some aggregations, which are connected each other.

Example:

If I search for "manager" in "London" i would like to have the aggregation for all the other cities, which have "manager" and the amout of jobs. Also I want to have the job\_types for the search "manager" in "London".

As I see, this is not possible in one query, because the main query with the search keyword "manager" is including the aggregation query and in this case I become only "London" as aggregated city.

Do I make something wrong?

Thanks  
Nik

---

<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:12pm UTC](https://discuss.elastic.co/t/nested-aggregations-in-chain/43133/2 "2017-07-05T23:12:25Z")

</div>

Closed on July 5, 2017, 11:12pm UTC


