2013-08-28 19:24:34 -04:00
|
|
|
[[search-facets-query-facet]]
|
|
|
|
=== Query Facets
|
|
|
|
|
2014-06-12 10:38:10 -04:00
|
|
|
include::deprecated.asciidoc[]
|
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
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:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"facets" : {
|
|
|
|
"wow_facet" : {
|
|
|
|
"query" : {
|
|
|
|
"term" : { "tag" : "wow" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|