(es_query_class, domain, extra_filters=None)
return Counter(query.run().aggregations.doc_type.counts_by_bucket())
:param es_query_class: Subclass of ``HQESQuery``
    :param domain: Domain name to filter on
    :returns: Counter of document counts per doc_type in the ES Index
:param es_query_class: Subclass of ``HQESQuery``
    :param domain: Domain name to filter on
    :returns: Counter of document counts per doc_type in the ES Index
: param es_query_class : Subclass of HQESQuery : param domain : Domain name to filter on : returns : Counter of document counts per doc_type in the ES Index
def get_index_counts_by_domain_doc_type(es_query_class, domain, extra_filters=None):
    """
    :param es_query_class: Subclass of ``HQESQuery``
    :param domain: Domain name to filter on
    :returns: Counter of document counts per doc_type in the ES Index
    """
    query = (
        es_query_class()
        .remove_default_filters()
        .filter(es.users.domain(domain))
        .terms_aggregation('doc_type', 'doc_type')
        .size(0))

    if extra_filters is not None:
        for extra_filter in extra_filters:
            query = query.filter(extra_filter)

    return Counter(query.run().aggregations.doc_type.counts_by_bucket())
def get_index_counts_by_domain_doc_type ( es_query_class , domain , extra_filters = None ) : query = ( es_query_class ( ) . remove_default_filters ( ) . filter ( es . users . domain ( domain ) ) . terms_aggregation ( 'doc_type' , 'doc_type' ) . size ( 0 ) ) if extra_filters is not None : for extra_filter in extra_filters : query = query . filter ( extra_filter ) return Counter ( query . run ( ) . aggregations . doc_type . counts_by_bucket ( ) )