class ProjectionRepositoryImpl implements ProjectionRepository, Constants {

    @Override
    public Long getTotalAssetCountByTargetType(String targetType) throws DataException {
        Map<String, Object> mustFilter = new HashMap<>();
        Map<String, Object> mustTermsFilter = new HashMap<>();
        mustFilter.put("latest", true);
        mustFilter.put(CommonUtils.convertAttributetoKeyword("inScope"), true);
        try {
            return esRepository.getTotalDocumentCountForIndexAndType("aws" + "_" + targetType, targetType, mustFilter,
                    null, null, null, mustTermsFilter);
        } catch (Exception e) {
            logger.error(e);
            throw new DataException(e);
        }
    }

}