class DetectorMappingRepositoryImpl implements DetectorMappingRepository {

    @Override
    public void deleteDetectorMapping(String id) {
        val deleteRequest = new DeleteRequest(elasticSearchProperties.getIndexName(), elasticSearchProperties.getDocType(), id);
        try {
            val deleteResponse = legacyElasticSearchClient.delete(deleteRequest, RequestOptions.DEFAULT);
            if (elasticsearchUtil.checkNullResponse(deleteResponse.getResult())) {
                throw new RecordNotFoundException("Invalid request: " + id);
            }
        } catch (IOException e) {
            log.error(String.format("Deleting mapping %s failed", id), e);
            throw new RuntimeException(e);
        }
    }

    @Autowired public  DetectorMappingRepositoryImpl(MetricRegistry metricRegistry);

}