diff --git a/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts b/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts index 493f5da813151c..420b15cd706d0c 100644 --- a/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts +++ b/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts @@ -100,7 +100,7 @@ async function asyncSearch( keepAlive: '1m', // Extend the TTL for this search request by one minute }; - const querystring = toSnakeCase({ + const queryOptions = toSnakeCase({ ...asyncOptions, ...(batchedReduceSize && { batchedReduceSize }), ...queryParams, @@ -110,7 +110,7 @@ async function asyncSearch( if (!request.id) { esResponse = await client.asyncSearch.submit({ body, - ...querystring, + ...queryOptions, }); } else { esResponse = await client.asyncSearch.get({