use of org.sonar.server.es.Index.ALL_INDICES in project sonarqube by SonarSource.
the class EsTester method after.
@Override
protected void after() {
if (isCustom) {
// delete non-core indices
String[] existingIndices = getIndicesNames();
Stream.of(existingIndices).filter(i -> !CORE_INDICES_NAMES.contains(i)).forEach(EsTester::deleteIndexIfExists);
}
BulkIndexer.delete(ES_REST_CLIENT, IndexType.main(ALL_INDICES, "dummy"), EsClient.prepareSearch(ALL_INDICES.getName()).source(new SearchSourceBuilder().query(QueryBuilders.matchAllQuery())));
}
Aggregations