From 0b435c3c93d348d79cc67a9f634ae85da4f903b1 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:57:01 -0700 Subject: [PATCH] adding tracking_total_hits in search query for findings (#1487) (#1489) (cherry picked from commit d7ee9717366a1c224cbf8f6611064ea9edbe3455) Signed-off-by: Riya Saxena Signed-off-by: github-actions[bot] Co-authored-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 62d7e83b9..268087f1e 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt @@ -134,7 +134,7 @@ class TransportGetFindingsSearchAction @Inject constructor( ) ) } - searchSourceBuilder.query(queryBuilder) + searchSourceBuilder.query(queryBuilder).trackTotalHits(true) client.threadPool().threadContext.stashContext().use { scope.launch {