diff --git a/x-pack/plugins/rule_registry/common/types.ts b/x-pack/plugins/rule_registry/common/types.ts index a7499d97d05f6..7b2fde48057a6 100644 --- a/x-pack/plugins/rule_registry/common/types.ts +++ b/x-pack/plugins/rule_registry/common/types.ts @@ -66,7 +66,7 @@ interface BucketAggsSchemas { exclude?: string | string[]; include?: string | string[]; execution_hint?: string; - missing?: number; + missing?: number | string; min_doc_count?: number; size?: number; show_term_doc_count_error?: boolean; @@ -170,7 +170,7 @@ export const BucketAggsSchemas: t.Type = t.recursion('BucketA exclude: t.union([t.string, t.array(t.string)]), include: t.union([t.string, t.array(t.string)]), execution_hint: t.string, - missing: t.number, + missing: t.union([t.number, t.string]), min_doc_count: t.number, size: t.number, show_term_doc_count_error: t.boolean, diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts index ad82dec713952..75b63fe51f7cb 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts @@ -612,8 +612,7 @@ export class AlertsClient { query, aggs, _source, - // eslint-disable-next-line @typescript-eslint/naming-convention - track_total_hits, + track_total_hits: trackTotalHits, size, index, }: { @@ -624,16 +623,13 @@ export class AlertsClient { _source?: string[] | undefined; size?: number | undefined; }) { - this.logger.debug( - JSON.stringify({ query, aggs, _source, track_total_hits, size, index }, null, 2) - ); try { // first search for the alert by id, then use the alert info to check if user has access to it const alertsSearchResponse = await this.singleSearchAfterAndAudit({ query, aggs, _source, - track_total_hits, + track_total_hits: trackTotalHits, size, index, operation: ReadOperations.Find,