diff --git a/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.js b/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.js index cd316593dde9e..f1b333daef269 100644 --- a/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.js +++ b/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.js @@ -47,7 +47,8 @@ function getFieldsForTypes(searchFields, types) { if (!searchFields || !searchFields.length) { return { - all_fields: true + lenient: true, + fields: ['*'], }; } diff --git a/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.test.js b/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.test.js index 1d0a8063be992..09673397455af 100644 --- a/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.test.js +++ b/src/legacy/server/saved_objects/service/lib/search_dsl/query_params.test.js @@ -235,7 +235,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ] @@ -265,7 +266,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ] @@ -294,7 +296,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ] @@ -323,7 +326,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ] @@ -767,7 +771,8 @@ describe('searchDsl/queryParams', () => { must: [ { simple_query_string: { - all_fields: true, + lenient: true, + fields: ['*'], default_operator: 'AND', query: 'foo', },