From 3cef97cd6b8bdc27b7ebc4847a2c0045259e6178 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 Mar 2024 22:15:32 +0000 Subject: [PATCH] adding tracking_total_hits in search query for findings (#1487) Signed-off-by: Riya Saxena (cherry picked from commit d7ee9717366a1c224cbf8f6611064ea9edbe3455) Signed-off-by: github-actions[bot] --- .../opensearch/alerting/transport/TransportGetFindingsAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt index 584ef050f..b9457655b 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt @@ -135,7 +135,7 @@ class TransportGetFindingsSearchAction @Inject constructor( ) ) } - searchSourceBuilder.query(queryBuilder) + searchSourceBuilder.query(queryBuilder).trackTotalHits(true) client.threadPool().threadContext.stashContext().use { scope.launch {