def query_domain(self, domain, typenames, domainquerytype='list',
        count=False):

        objects = self._get_repo_filter(ResourceBase.objects)

        if domainquerytype == 'range':
            return [tuple(objects.aggregate(
            Min(domain), Max(domain)).values())]
        else:
            if count:
                return [(d[domain], d['%s__count' % domain]) \
                for d in objects.values(domain).annotate(Count(domain))]
            else:
                return objects.values_list(domain).distinct()
Query by property domain values
dataset/ETHPy150Open geopython/pycsw/pycsw/plugins/repository/geonode/geonode_.py/GeoNodeRepository.query_domain