diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt b/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt index 272da7385..c1ef77c82 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt @@ -596,8 +596,8 @@ object DocumentLevelMonitorRunner : MonitorRunner() { docsToQueries: MutableMap>, ) { val count: Int = docExecutionCtx.updatedLastRunContext["shards_count"] as Int - val transformedDocs = mutableListOf>() for (i: Int in 0 until count) { + val transformedDocs = mutableListOf>() val shard = i.toString() try { val maxSeqNo: Long = docExecutionCtx.updatedLastRunContext[shard].toString().toLong()