Specifying the timeout for the msearch in the body
This commit is contained in:
parent
d46eaf9903
commit
7b07bfa2e6
|
@ -23,7 +23,7 @@ import { SearchRequestProvider } from '../search_request';
|
|||
import { SegmentedHandleProvider } from './segmented_handle';
|
||||
import { pushAll } from '../../../../utils/collection';
|
||||
|
||||
export function SegmentedSearchRequestProvider(Private, config) {
|
||||
export function SegmentedSearchRequestProvider(Private, config, esShardTimeout) {
|
||||
const SearchRequest = Private(SearchRequestProvider);
|
||||
const SegmentedHandle = Private(SegmentedHandleProvider);
|
||||
|
||||
|
@ -108,6 +108,7 @@ export function SegmentedSearchRequestProvider(Private, config) {
|
|||
if (_.isNumber(this._desiredSize)) {
|
||||
params.body.size = this._pickSizeForIndices(indices);
|
||||
}
|
||||
params.body.timeout = `${esShardTimeout}ms`;
|
||||
|
||||
return params;
|
||||
});
|
||||
|
|
|
@ -50,8 +50,7 @@ export function serializeFetchParams(
|
|||
timeFilter,
|
||||
kbnIndex,
|
||||
sessionId,
|
||||
config,
|
||||
esShardTimeout) {
|
||||
config) {
|
||||
const indexToListMapping = {};
|
||||
const timeBounds = timeFilter.getActiveBounds();
|
||||
const promises = requestsFetchParams.map(function (fetchParams) {
|
||||
|
@ -94,7 +93,6 @@ export function serializeFetchParams(
|
|||
type: fetchParams.type,
|
||||
search_type: fetchParams.search_type,
|
||||
ignore_unavailable: true,
|
||||
timeout: esShardTimeout,
|
||||
};
|
||||
if (config.get('courier:setRequestPreference') === 'sessionId') {
|
||||
header.preference = sessionId;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import { serializeFetchParams } from './serialize_fetch_params';
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
export function SerializeFetchParamsProvider(Promise, kbnIndex, sessionId, config, esShardTimeout) {
|
||||
export function SerializeFetchParamsProvider(Promise, kbnIndex, sessionId, config) {
|
||||
return (fetchParams) => (
|
||||
serializeFetchParams(
|
||||
fetchParams,
|
||||
|
@ -28,7 +28,6 @@ export function SerializeFetchParamsProvider(Promise, kbnIndex, sessionId, confi
|
|||
timefilter,
|
||||
kbnIndex,
|
||||
sessionId,
|
||||
config,
|
||||
esShardTimeout)
|
||||
config)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue