Endpoint for callWithRequest of scroll query

hello guys,

please give information about endpoint to make search query with scroll with callWithReqeust.

  if (request.payload.scroll_id !== null) {
                callWithRequest(request, '**what should be here??? thanks**', {
                    index: `${config.es.default_index}`,
                    allowNoIndices: false,
                    body: {
                        size: 50,
                        scroll: '5m',
                        scroll_id: request.payload.scroll_id
                }).then((res) => reply(res))
                    .catch((err) => reply(handleESError(err)));

In your initial search request, you'd just want search, and then in your subsequent scroll requests, you'd want scroll. Here's an example of this inside the Kibana source code: https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/server/routes/api/scroll_search/index.js#L17

Feel free to use that as a guide, but I don't recommend using those two Kibana endpoints directly, since they will be removed in the near future without warning.

hi, thanks, it help me :sunny:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.