We are using the following request, to return the number of documents per doc-type. But it just lists all types with more then zero documents. How can we also return all types that have no document yet?
GET /myIndex/_search?search_type=count
{
"aggs": {
"count_by_type": {
"terms": {
"field": "_type"
}
}
}
}