From f0009926bd1153f2e3095499600b22e8138dc43c Mon Sep 17 00:00:00 2001 From: Stevan Buzejic Date: Thu, 12 Jan 2023 23:02:49 +0100 Subject: [PATCH 1/2] Added document _id as param for terms query when searching alerts by their ids Signed-off-by: Stevan Buzejic --- .../opensearch/alerting/transport/TransportGetAlertsAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt index e7810337a..814b27b94 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt @@ -100,7 +100,7 @@ class TransportGetAlertsAction @Inject constructor( queryBuilder.filter(QueryBuilders.termQuery("state", getAlertsRequest.alertState)) if (getAlertsRequest.alertIds.isNullOrEmpty() == false) { - queryBuilder.filter(QueryBuilders.termsQuery("id", getAlertsRequest.alertIds)) + queryBuilder.filter(QueryBuilders.termsQuery("_id", getAlertsRequest.alertIds)) } if (getAlertsRequest.monitorId != null) { From 06e6d22cad30fe1b326f0ade7cd8dcc2fc795510 Mon Sep 17 00:00:00 2001 From: Stevan Buzejic Date: Fri, 13 Jan 2023 00:44:16 +0100 Subject: [PATCH 2/2] Empty-Commit Signed-off-by: Stevan Buzejic