I want to fetch es data in visualization all by myself and handle the response data
so I use custom request hander in visulization
const customRequestHandler = async (vis, params) => {
const { appState, searchSource, uiState, queryFilter, timeRange, filters, query } = params;
// searchSource.setField('size', vis.params.numberOfRowsToFetch)
const dataLoaderParams = {
searchSource,
timeRange,
query,
queryFilter,
filters,
uiState,
aggs: vis.getAggConfig(),
forceFetch: false,
}
const requestHandlers = Private(VisRequestHandlersRegistryProvider);
const requestHandler = requestHandlers.find(handler => handler.name === 'courier').handler;
return await requestHandler(vis, dataLoaderParams)
};
but the console will print
courier.js:166 Uncaught (in promise) TypeError: Cannot read property 'reset' of undefined
at courier.js:166
I tried but can not figure it out, I will be appreciate if you guys could give some advice