Query Facetsedit

Warning

Facets are deprecated and will be removed in a future release. You are encouraged to migrate to aggregations instead.

A facet query allows to return a count of the hits matching the facet query. The query itself can be expressed using the Query DSL. For example:

{
    "facets" : {
        "wow_facet" : {
            "query" : {
                "term" : { "tag" : "wow" }
            }
        }
    }
}