From 230baf4e0ae74e77236a1f4ad2dfdf1af96dcc43 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Thu, 7 Mar 2019 20:10:35 +0300 Subject: [PATCH] [6.7] Deprecated field [all_fields] used --- .../service/lib/search_dsl/query_params.js | 3 ++- .../service/lib/search_dsl/query_params.test.js | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/server/saved_objects/service/lib/search_dsl/query_params.js b/src/server/saved_objects/service/lib/search_dsl/query_params.js index 5bcff743c1082..c50d136688b01 100644 --- a/src/server/saved_objects/service/lib/search_dsl/query_params.js +++ b/src/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/server/saved_objects/service/lib/search_dsl/query_params.test.js b/src/server/saved_objects/service/lib/search_dsl/query_params.test.js index 45f241ba41883..5fd967d6b7d30 100644 --- a/src/server/saved_objects/service/lib/search_dsl/query_params.test.js +++ b/src/server/saved_objects/service/lib/search_dsl/query_params.test.js @@ -237,7 +237,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ] @@ -267,7 +268,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ] @@ -296,7 +298,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ] @@ -325,7 +328,8 @@ describe('searchDsl/queryParams', () => { { simple_query_string: { query: 'us*', - all_fields: true + lenient: true, + fields: ['*'], } } ]