I'm using the query below to find the word "developer" in a blog index...
http://localhost:9200/blog/_search
{
"query": {
"query_string": {
"query": "developer"
}
}
}
The query returns 3 hits on user
and 1 hit on post
types, and I want a facet to reflect those hits to display something like...
Search Results...
Blogs Posts (1)
Users (3)
...but I'm not sure how to combine a facet with a query to count such hits since most examples I found count field hits; I tried using _index
to return index hits, but could not get it to work; is there something similar for types, like _type
, to count document type hits within an index?