Skip to content

Commit

Permalink
[Data] [Search] postFlightRequest should accept `disableShardFailureW…
Browse files Browse the repository at this point in the history
…arning` param (#143096)
  • Loading branch information
alexwizp authored Oct 12, 2022
1 parent 6aae088 commit e5cebd8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/plugins/data/common/search/aggs/agg_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ type PostFlightRequestFn<TAggConfig> = (
searchSource: ISearchSource,
inspectorRequestAdapter?: RequestAdapter,
abortSignal?: AbortSignal,
searchSessionId?: string
searchSessionId?: string,
disableShardFailureWarning?: boolean
) => Promise<estypes.SearchResponse<any>>;

export interface AggTypeConfig<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ export const createOtherBucketPostFlightRequest = (
searchSource,
inspectorRequestAdapter,
abortSignal,
searchSessionId
searchSessionId,
disableShardFailureWarning
) => {
if (!resp.aggregations) return resp;
const nestedSearchSource = searchSource.createChild();
Expand All @@ -347,6 +348,7 @@ export const createOtherBucketPostFlightRequest = (
nestedSearchSource.fetch$({
abortSignal,
sessionId: searchSessionId,
disableShardFailureWarning,
inspector: {
adapter: inspectorRequestAdapter,
title: i18n.translate('data.search.aggs.buckets.terms.otherBucketTitle', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ export class SearchSource {
this,
options.inspector?.adapter,
options.abortSignal,
options.sessionId
options.sessionId,
options.disableShardFailureWarning
);
}
}
Expand Down

0 comments on commit e5cebd8

Please sign in to comment.