mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Use search:includeFrozen setting in all requests. (#29173)
This commit is contained in:
parent
dc3a354b3e
commit
b256889e14
2 changed files with 11 additions and 1 deletions
4
src/server/kbn_server.d.ts
vendored
4
src/server/kbn_server.d.ts
vendored
|
@ -35,6 +35,10 @@ declare module 'hapi' {
|
|||
interface Server {
|
||||
config: () => KibanaConfig;
|
||||
}
|
||||
|
||||
interface Request {
|
||||
getUiSettingsService: () => any;
|
||||
}
|
||||
}
|
||||
|
||||
type KbnMixinFunc = (kbnServer: KbnServer, server: Server, config: any) => Promise<any> | void;
|
||||
|
|
|
@ -94,7 +94,13 @@ export class InfraKibanaBackendFrameworkAdapter implements InfraBackendFramework
|
|||
const internalRequest = req[internalInfraFrameworkRequest];
|
||||
const { elasticsearch } = internalRequest.server.plugins;
|
||||
const { callWithRequest } = elasticsearch.getCluster('data');
|
||||
const fields = await callWithRequest(internalRequest, endpoint, params, ...rest);
|
||||
const includeFrozen = await internalRequest.getUiSettingsService().get('search:includeFrozen');
|
||||
const fields = await callWithRequest(
|
||||
internalRequest,
|
||||
endpoint,
|
||||
{ ...params, ignore_throttled: !includeFrozen },
|
||||
...rest
|
||||
);
|
||||
return fields;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue