'This method makes use of the aggregation framework to
produce distinct values for a given field.'

def distinct(self, field, flt=None, sort=None, limit=None, skip=None):

    cursor = self.set_limits(self.db[self.colname_passive].aggregate(self._distinct(field, flt=flt, sort=sort, limit=limit, skip=skip), cursor={}))
    return (res['_id'] for res in cursor)
