mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Don't create nested search source per postflightrequest (#20373)
This commit is contained in:
parent
93d9baafff
commit
59426cbfa4
2 changed files with 3 additions and 3 deletions
|
@ -92,7 +92,8 @@ export const termsBucketAgg = new BucketAggType({
|
|||
};
|
||||
},
|
||||
createFilter: createFilterTerms,
|
||||
postFlightRequest: async (resp, aggConfigs, aggConfig, nestedSearchSource) => {
|
||||
postFlightRequest: async (resp, aggConfigs, aggConfig, searchSource) => {
|
||||
const nestedSearchSource = searchSource.makeChild();
|
||||
if (aggConfig.params.otherBucket) {
|
||||
const filterAgg = buildOtherBucketAgg(aggConfigs, aggConfig, resp);
|
||||
nestedSearchSource.set('aggs', filterAgg);
|
||||
|
|
|
@ -140,8 +140,7 @@ const CourierRequestHandlerProvider = function () {
|
|||
}).then(async resp => {
|
||||
for (const agg of aggs) {
|
||||
if (_.has(agg, 'type.postFlightRequest')) {
|
||||
const nestedSearchSource = requestSearchSource.makeChild();
|
||||
resp = await agg.type.postFlightRequest(resp, aggs, agg, nestedSearchSource);
|
||||
resp = await agg.type.postFlightRequest(resp, aggs, agg, requestSearchSource);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue