From ca9dea01d59fddd10b43513450707421248b96d5 Mon Sep 17 00:00:00 2001 From: Liza K Date: Sun, 12 Jan 2020 12:28:24 +0200 Subject: [PATCH] Cleanup search params --- .../data/public/search/fetch/get_search_params.ts | 6 +----- .../search/search_strategy/default_search_strategy.ts | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/legacy/core_plugins/data/public/search/fetch/get_search_params.ts b/src/legacy/core_plugins/data/public/search/fetch/get_search_params.ts index de9ec4cb920e8..ec97cb6b7ee45 100644 --- a/src/legacy/core_plugins/data/public/search/fetch/get_search_params.ts +++ b/src/legacy/core_plugins/data/public/search/fetch/get_search_params.ts @@ -29,14 +29,10 @@ export function getMSearchParams(config: IUiSettingsClient) { }; } -export function getSearchParams(config: IUiSettingsClient, esShardTimeout: number = 0) { +export function getSearchParams(config: IUiSettingsClient) { return { - rest_total_hits_as_int: true, - ignore_unavailable: true, ignore_throttled: getIgnoreThrottled(config), max_concurrent_shard_requests: getMaxConcurrentShardRequests(config), - preference: getPreference(config), - timeout: getTimeout(esShardTimeout), }; } diff --git a/src/legacy/core_plugins/data/public/search/search_strategy/default_search_strategy.ts b/src/legacy/core_plugins/data/public/search/search_strategy/default_search_strategy.ts index a83bd93a02796..b5973c28f12eb 100644 --- a/src/legacy/core_plugins/data/public/search/search_strategy/default_search_strategy.ts +++ b/src/legacy/core_plugins/data/public/search/search_strategy/default_search_strategy.ts @@ -65,14 +65,9 @@ function msearch({ searchRequests, es, config, esShardTimeout }: SearchStrategyS }; } -function search({ - searchRequests, - searchService, - config, - esShardTimeout, -}: SearchStrategySearchParams) { +function search({ searchRequests, searchService, config }: SearchStrategySearchParams) { const abortController = new AbortController(); - const searchParams = getSearchParams(config, esShardTimeout); + const searchParams = getSearchParams(config); const promises = searchRequests.map(({ index, body }) => { const params = { index: index.title || index,