diff --git a/packages/kbn-data-service/src/constants.ts b/packages/kbn-data-service/src/constants.ts index f44769c0eefa5..0bafe1d97b797 100644 --- a/packages/kbn-data-service/src/constants.ts +++ b/packages/kbn-data-service/src/constants.ts @@ -20,6 +20,7 @@ export const UI_SETTINGS = { COURIER_MAX_CONCURRENT_SHARD_REQUESTS: 'courier:maxConcurrentShardRequests', SEARCH_INCLUDE_FROZEN: 'search:includeFrozen', SEARCH_TIMEOUT: 'search:timeout', + SEARCH_EXCLUDED_DATA_TIERS: 'search:search_excluded_data_tiers', HISTOGRAM_BAR_TARGET: 'histogram:barTarget', HISTOGRAM_MAX_BARS: 'histogram:maxBars', HISTORY_LIMIT: 'history:limit', diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index 8dc58c3ffd637..ab435ef69b159 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -579,5 +579,21 @@ export function getUiSettings( schema: schema.number(), requiresPageReload: true, }, + [UI_SETTINGS.SEARCH_EXCLUDED_DATA_TIERS]: { + name: i18n.translate('data.advancedSettings.searchExcludedDataTiers', { + defaultMessage: 'Excluded data tiers from search', + }), + value: [], + description: i18n.translate('data.advancedSettings.searchExcludedDataTiersDesc', { + defaultMessage: `Specify the data tiers to exclude from search, such as data_cold and/or data_frozen. + When configured, indices allocated in the selected tiers will be ignored from search requests.`, + }), + type: 'array', + category: ['search'], + schema: schema.arrayOf( + schema.oneOf([schema.literal('data_cold'), schema.literal('data_frozen')]) + ), + requiresPageReload: false, + }, }; } diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts index d1ab81f3e60a7..b67a72cf2edfb 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -134,6 +134,13 @@ export const stackManagementSchema: MakeSchemaFrom = { type: 'boolean', _meta: { description: 'Non-default value of setting.' }, }, + 'search:search_excluded_data_tiers': { + type: 'array', + items: { + type: 'keyword', + _meta: { description: 'Non-default value of setting.' }, + }, + }, 'courier:maxConcurrentShardRequests': { type: 'long', _meta: { description: 'Non-default value of setting.' }, diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts index c66f4f07a296e..863c007e35ef2 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -78,6 +78,7 @@ export interface UsageStats { 'securitySolution:excludeColdAndFrozenTiersInAnalyzer': boolean; 'securitySolution:enableCcsWarning': boolean; 'search:includeFrozen': boolean; + 'search:search_excluded_data_tiers': string[]; 'courier:maxConcurrentShardRequests': number; 'courier:setRequestPreference': string; 'courier:customRequestPreference': string; diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 70fbeec73bc5d..8f930a16eb6d2 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -9794,6 +9794,15 @@ "description": "Non-default value of setting." } }, + "search:search_excluded_data_tiers": { + "type": "array", + "items": { + "type": "keyword", + "_meta": { + "description": "Non-default value of setting." + } + } + }, "courier:maxConcurrentShardRequests": { "type": "long", "_meta": {