class FilterRepositoryImpl implements FilterRepository, Constants {

    public Map<String, Long> getPoliciesFromES(String assetGroup)
            throws DataException {
        Map<String, Object> mustFilter = new HashMap<>();
        Map<String, Object> mustNotFilter = new HashMap<>();
        String aggsFilter = CommonUtils.convertAttributetoKeyword("policyId");
        try{
        return elasticSearchRepository.getTotalDistributionForIndexAndType(
                assetGroup, null, mustFilter, mustNotFilter, null, aggsFilter,
                1000, null);
        }catch(Exception e){
        	logger.error("error in getPoliciesFromES",e);
            throw new DataException(e);
        }
    }

}