From 97bed79642dd41f74fd54460eceb44ed49f13017 Mon Sep 17 00:00:00 2001 From: Jonathan Buttner Date: Mon, 10 Apr 2023 17:03:16 -0400 Subject: [PATCH] Fixing caseIds issue --- .../cases/server/telemetry/queries/cases.ts | 4 ++- .../schema/xpack_plugins.json | 27 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/cases/server/telemetry/queries/cases.ts b/x-pack/plugins/cases/server/telemetry/queries/cases.ts index 9d873a165f49d..59576fa1f45c0 100644 --- a/x-pack/plugins/cases/server/telemetry/queries/cases.ts +++ b/x-pack/plugins/cases/server/telemetry/queries/cases.ts @@ -234,6 +234,7 @@ const getCommentsSavedObjectTelemetry = async ( externalReferenceTypes: { terms: { field: `${CASE_COMMENT_SAVED_OBJECT}.attributes.externalReferenceAttachmentTypeId`, + size: 10, }, aggs: { ...getMaxBucketOnCaseAggregationQuery(CASE_COMMENT_SAVED_OBJECT), @@ -242,6 +243,7 @@ const getCommentsSavedObjectTelemetry = async ( persistableReferenceTypes: { terms: { field: `${CASE_COMMENT_SAVED_OBJECT}.attributes.persistableStateAttachmentTypeId`, + size: 10, }, aggs: { ...getMaxBucketOnCaseAggregationQuery(CASE_COMMENT_SAVED_OBJECT), @@ -320,7 +322,7 @@ const getFilesTelemetry = async ( {} ); - const filterCaseIdExists = fromKueryExpression(`${FILE_SO_TYPE}.attributes.Meta.caseId: *`); + const filterCaseIdExists = fromKueryExpression(`${FILE_SO_TYPE}.attributes.Meta.caseIds: *`); return savedObjectsClient.find({ page: 0, diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 2b72d15439070..b33416a9b087f 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -4995,6 +4995,15 @@ }, "total": { "type": "long" + }, + "topMimeTypes": { + "type": "array", + "items": { + "properties": { + "name": "keyword", + "count": "long" + } + } } } } @@ -5082,6 +5091,15 @@ }, "total": { "type": "long" + }, + "topMimeTypes": { + "type": "array", + "items": { + "properties": { + "name": "keyword", + "count": "long" + } + } } } } @@ -5169,6 +5187,15 @@ }, "total": { "type": "long" + }, + "topMimeTypes": { + "type": "array", + "items": { + "properties": { + "name": "keyword", + "count": "long" + } + } } } }