Stuck migrating from facets to aggregations - no equivalent of top level "filter"?

I was trying to migrate my application from ES 1.7 replacing facets with aggregations and stuck on top level filter being removed. With 1.x elastic it was possible to use filter and query where filter would only apply to hits but not to facets. Looks like in ES 2.2 and with aggregation there is no similar functionality. It really is central to all my navigation and faceting combined with search and filtering paradigm and I do not see any solution for my issue - I need to be able to get hits and facets (aggs) in one query where hits would have query and filter applied to it while facets only query

I would appreciate your advice


The filter has been renamed post_fitler:

Previously, the term "filter" was ambiguous, so now it always applies

Thanks Ivan! I glanced over post query topic without reading it but for some reason assumed it is about rescoring :frowning: silly me