Ok, figured it out, apparently there is a _type
field for facets, based on this...
Query
http://localhost:9200/blog/_search
{
"size" : 0,
"query" : {
"query_string" : {
"query" : "developer"}
},
"facets" : {
"type" : {
"terms" : { "field" : "_type"}
}
}
}
Response
{
...
"facets": {
"type": {
"_type": "terms",
"missing": 0,
"total": 4,
"other": 0,
"terms": [
{
"term": "user",
"count": 3
},
{
"term": "post",
"count": 1
}
]
}
}
}