diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt index c56621745..c1f14ea83 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt @@ -326,7 +326,7 @@ class AlertIndices( } val findingsIndex = dataSources.findingsIndex val findingsIndexPattern = dataSources.findingsIndexPattern ?: FINDING_HISTORY_INDEX_PATTERN - if (!clusterService.state().routingTable().hasIndex(findingsIndex)) { + if (!clusterService.state().metadata().hasAlias(findingsIndexPattern)) { createIndex( findingsIndexPattern, findingMapping(),