'Returns a dictionary containing the calculations (aggregation)
over the current queryset
If args is present the expression is passed as a kwarg using
the Aggregate object\'s default alias.'

def aggregate(self, *args, **kwargs):

    obj = self._clone()
    obj._facets = []
    from django.db.models import Avg, Max, Min
    for arg in args:
        if isinstance(arg, (Avg, Max, Min)):
            (field, djfield) = self._django_to_es_field(arg.lookup)
            if (not djfield):
                obj = obj.annotate(field)
            from pyes.facets import StatisticalFacet
            obj = obj.annotate(StatisticalFacet(field, field))
    facets = obj.get_facets()
    result = {}
    for (name, values) in facets.items():
        for (k, v) in values.items():
            if k.startswith('_'):
                continue
            result[(u'%s__%s' % (name, k))] = v
    return result
