Will it be possible to change the size of query output while Scrolling

public SearchResponse scroll(String scrollId) throws IOException {
log.debug("ScrollId: {}", scrollId);
Scroll scroll = new Scroll(TimeValue.timeValueMinutes(5L));
SearchScrollRequest scrollRequest = new SearchScrollRequest(scrollId);
scrollRequest.scroll(scroll);

    return esClient.getHighLevelClient().scroll(scrollRequest, RequestOptions.DEFAULT);
}

For ex: i have created a search request with 1000
is there any way to change the size to 500 while crolling.

Hi @2fbf693dba5c4818f8b4 , the scroll API call doesn't include additional customization other than the scroll ID, scroll time period and how to display the total result count. You can either set your initial query to 500 results or get 1000 results back from scroll.

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