From f101d9f84875a3738f4556bf55902c24ec6c1584 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 Mar 2024 22:15:34 +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 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 {