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

**URL:** <https://discuss.elastic.co/t/will-it-be-possible-to-change-the-size-of-query-output-while-scrolling/343833>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [September 26, 2023, 5:37am UTC](https://discuss.elastic.co/t/will-it-be-possible-to-change-the-size-of-query-output-while-scrolling/343833 "2023-09-26T05:37:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![2fbf693dba5c4818f8b4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/2fbf693dba5c4818f8b4/32/125801_2.png) [@2fbf693dba5c4818f8b4](https://discuss.elastic.co/u/2fbf693dba5c4818f8b4)\
**Post date:** [September 26, 2023, 5:37am UTC](https://discuss.elastic.co/t/will-it-be-possible-to-change-the-size-of-query-output-while-scrolling/343833/1 "2023-09-26T05:37:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [September 26, 2023, 12:06pm UTC](https://discuss.elastic.co/t/will-it-be-possible-to-change-the-size-of-query-output-while-scrolling/343833/2 "2023-09-26T12:06:35Z")

</div>

Hi @2fbf693dba5c4818f8b4 , the [scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/current/scroll-api.html) 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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 24, 2023, 12:06pm UTC](https://discuss.elastic.co/t/will-it-be-possible-to-change-the-size-of-query-output-while-scrolling/343833/3 "2023-10-24T12:06:48Z")

</div>

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