Skip to content

Commit

Permalink
Remove deprecated courier:batchSearches advanced setting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Aug 19, 2021
1 parent 913d178 commit da702fe
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 595 deletions.
8 changes: 0 additions & 8 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,6 @@ changes.
[[kibana-search-settings]]
==== Search

[horizontal]
[[courier-batchsearches]]`courier:batchSearches`::
**Deprecated in 7.6. Starting in 8.0, this setting will be optimized internally.**
When disabled, dashboard panels will load individually, and search requests will
terminate when users navigate away or update the query. When enabled, dashboard
panels will load together when all of the data is loaded, and searches will not
terminate.

[[courier-customrequestpreference]]`courier:customRequestPreference`::
{ref}/search-request-body.html#request-body-search-preference[Request preference]
to use when `courier:setRequestPreference` is set to "custom".
Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const UI_SETTINGS = {
COURIER_SET_REQUEST_PREFERENCE: 'courier:setRequestPreference',
COURIER_CUSTOM_REQUEST_PREFERENCE: 'courier:customRequestPreference',
COURIER_MAX_CONCURRENT_SHARD_REQUESTS: 'courier:maxConcurrentShardRequests',
COURIER_BATCH_SEARCHES: 'courier:batchSearches',
SEARCH_INCLUDE_FROZEN: 'search:includeFrozen',
SEARCH_TIMEOUT: 'search:timeout',
HISTOGRAM_BAR_TARGET: 'histogram:barTarget',
Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/common/search/search_source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export { extractReferences } from './extract_references';
export { parseSearchSourceJSON } from './parse_json';
export { getResponseInspectorStats } from './inspect';
export * from './fetch';
export * from './legacy';
export * from './search_source';
export * from './search_source_service';
export * from './types';
9 changes: 0 additions & 9 deletions src/plugins/data/common/search/search_source/legacy/index.ts

This file was deleted.

29 changes: 0 additions & 29 deletions src/plugins/data/common/search/search_source/legacy/types.ts

This file was deleted.

23 changes: 5 additions & 18 deletions src/plugins/data/common/search/search_source/search_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
*/

import { setWith } from '@elastic/safer-lodash-set';
import { uniqueId, keyBy, pick, difference, isFunction, isEqual, uniqWith, isObject } from 'lodash';
import { difference, isEqual, isFunction, isObject, keyBy, pick, uniqueId, uniqWith } from 'lodash';
import {
catchError,
finalize,
Expand All @@ -78,7 +78,6 @@ import { fieldWildcardFilter } from '../../../../kibana_utils/common';
import { IIndexPattern, IndexPattern, IndexPatternField } from '../../index_patterns';
import {
AggConfigs,
ES_SEARCH_STRATEGY,
EsQuerySortValue,
IEsSearchResponse,
ISearchGeneric,
Expand All @@ -87,26 +86,25 @@ import {
import type {
ISearchSource,
SearchFieldValue,
SearchSourceOptions,
SearchSourceFields,
SearchSourceOptions,
} from './types';
import { FetchHandlers, RequestFailure, getSearchParamsFromRequest, SearchRequest } from './fetch';
import { FetchHandlers, getSearchParamsFromRequest, RequestFailure, SearchRequest } from './fetch';
import { getRequestInspectorStats, getResponseInspectorStats } from './inspect';

import {
getEsQueryConfig,
UI_SETTINGS,
IKibanaSearchResponse,
isErrorResponse,
isPartialResponse,
IKibanaSearchResponse,
UI_SETTINGS,
} from '../../../common';
import { getHighlightRequest } from '../../../../field_formats/common';
import { extractReferences } from './extract_references';

/** @internal */
export const searchSourceRequiredUiSettings = [
'dateFormat:tz',
UI_SETTINGS.COURIER_BATCH_SEARCHES,
UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE,
UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX,
UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS,
Expand Down Expand Up @@ -280,17 +278,6 @@ export class SearchSource {
fetch$(
options: ISearchOptions = {}
): Observable<IKibanaSearchResponse<estypes.SearchResponse<any>>> {
const { getConfig } = this.dependencies;
const syncSearchByDefault = getConfig(UI_SETTINGS.COURIER_BATCH_SEARCHES);

// Use the sync search strategy if legacy search is enabled.
// This still uses bfetch for batching.
if (!options?.strategy && syncSearchByDefault) {
options.strategy = ES_SEARCH_STRATEGY;
// `ES_SEARCH_STRATEGY` doesn't support search sessions, hence remove sessionId
options.sessionId = undefined;
}

const s$ = defer(() => this.requestIsStarting(options)).pipe(
switchMap(() => {
const searchRequest = this.flatten();
Expand Down
90 changes: 0 additions & 90 deletions src/plugins/data/server/search/routes/call_msearch.test.ts

This file was deleted.

92 changes: 0 additions & 92 deletions src/plugins/data/server/search/routes/call_msearch.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/plugins/data/server/search/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
* Side Public License, v 1.
*/

export * from './call_msearch';
export * from './msearch';
export * from './search';
Loading

0 comments on commit da702fe

Please sign in to comment.