From 889558d6c5550510a1bdc47b0433a3fa944e15af Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Wed, 6 Mar 2019 10:30:24 +0300 Subject: [PATCH] Deprecated field [all_fields] used, replaced by [Set [fields] to `*` instead]" (#32307) (#32452) --- .../service/lib/search_dsl/query_params.js | 3 ++- .../service/lib/search_dsl/query_params.test.js | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) 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', },