WARNING: Version 1.5 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Filter Facets
editFilter Facets
editFacets are deprecated and will be removed in a future release. You are encouraged to migrate to aggregations instead.
The equivalent aggregation would be the
filter
aggregation.
A filter facet (not to be confused with a facet filter) allows you to return a count of the hits matching the filter. The filter itself can be expressed using the Query DSL. For example:
{ "facets" : { "wow_facet" : { "filter" : { "term" : { "tag" : "wow" } } } } }
Note, filter facet filters are faster than query facet when using native filters (non query wrapper ones).