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


(Alex Roytman) #1

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

thanks
alex


(Ivan Brusic) #2

The filter has been renamed post_fitler:
https://www.elastic.co/guide/en/elasticsearch/reference/2.x/search-request-post-filter.html

Previously, the term "filter" was ambiguous, so now it always applies
pre-query.


(Alex Roytman) #3

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


(system) #4