class ProjectionRepositoryImpl implements ProjectionRepository, Constants {

    public Long getAssetCountByAg(String assetGroup, String resourceType) throws DataException {
        Map<String, Object> mustFilter = new HashMap<>();
        mustFilter.put(LATEST, true);
        mustFilter.put(CommonUtils.convertAttributetoKeyword(INSCOPE), true);
        try {
            return esRepository.getTotalDocumentCountForIndexAndType(assetGroup, resourceType, mustFilter, null, null,
                    null, null);
        } catch (Exception e) {
            logger.error(e);
            throw new DataException(e);
        }

    }

}