Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ES client to 9.0.0-alpha.4 #213375

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
ignore_unavailable is not defined in rollupSearch
afharo committed Mar 10, 2025
commit a99c19ef77d7e88b28e5eb483e4435f906d90e7c
Original file line number Diff line number Diff line change
@@ -314,7 +314,9 @@ describe('ES search strategy', () => {
expect(mockRollupSearchCaller).toHaveBeenCalledWith(
{
index: 'foo-程',
ignore_unavailable: true,
querystring: {
ignore_unavailable: true,
},
max_concurrent_shard_requests: undefined,
timeout: '100ms',
track_total_hits: true,
Original file line number Diff line number Diff line change
@@ -166,12 +166,20 @@ export const enhancedEsSearchStrategyProvider = (
throw new KbnSearchError(`"params.index" is required when performing a rollup search`, 400);
}

// eslint-disable-next-line @typescript-eslint/naming-convention
const { ignore_unavailable, ...params } = {
...querystring,
...request.params,
index: request.params.index,
};

try {
const esResponse = await client.rollup.rollupSearch(
{
...querystring,
...request.params,
index: request.params.index,
...params,
// Not defined in the spec, and the client places it in the body.
// This workaround allows us to force it as a query parameter.
querystring: { ignore_unavailable },
},
{
signal: options?.abortSignal,