Nested Aggregations in chain


(Nikolay) #1

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


(system) #2