diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index 7b386e864fbc1..5ab638a087783 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -168,12 +168,12 @@ export function getUiSettings( name: i18n.translate('data.advancedSettings.defaultIndexTitle', { defaultMessage: 'Default data view', }), - value: null, + value: '', type: 'string', description: i18n.translate('data.advancedSettings.defaultIndexText', { defaultMessage: 'Used by discover and visualizations when a data view is not set.', }), - schema: schema.nullable(schema.string()), + schema: schema.string(), }, [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: { name: i18n.translate('data.advancedSettings.courier.ignoreFilterTitle', { diff --git a/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts b/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts index d34ad5ccd5f4d..b980c684e529b 100644 --- a/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts +++ b/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts @@ -48,7 +48,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response5.status).to.be(200); const response6 = await supertest.get(defaultPath); - expect(response6.body[serviceKeyId]).to.be(null); + expect(response6.body[serviceKeyId]).to.be(''); }); }); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts index 0ac0bec2250ed..067c24d605e6c 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts @@ -72,7 +72,7 @@ export default function ({ getService }: FtrProviderContext) { // TODO: The response comes back undefined in Serverless const body = response6.body[serviceKeyId]; const expected = body === undefined ? null : body; - expect(expected).to.be(null); + expect(expected).to.be(''); }); }); });