# Scroll inner\_hits in Elasticsearch

**URL:** <https://discuss.elastic.co/t/scroll-inner-hits-in-elasticsearch/348757>\
**Category:** Elasticsearch\
**Created:** [December 6, 2023, 7:38pm UTC](https://discuss.elastic.co/t/scroll-inner-hits-in-elasticsearch/348757 "2023-12-06T19:38:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomTom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomtom/32/3676_2.png) [@TomTom](https://discuss.elastic.co/u/TomTom)\
**Post date:** [December 6, 2023, 7:38pm UTC](https://discuss.elastic.co/t/scroll-inner-hits-in-elasticsearch/348757/1 "2023-12-06T19:38:04Z")

</div>

I have a document that has nested items, and in some cases I need to query documents that have nested items that match the filter applied in the search and return all nested items that match.

To do this, in the search query I add the value `inner_hits`. In my tests I noticed that it only returns 3 items by default, and to return more I need to add a size, such as `size: 100`, to return 100 items.

It happens that if there are more than 100 items I cannot add a size like 150, nor can I navigate between the results, for example, making two queries one with `from:0, size:100` and another with `from:101, size:50`. In all cases I always have to increase Elasticsearch's `max_inner_result_window` configuration.

Is there any way, like scrolling, to navigate between inner\_hits without having to increase the `max_inner_result_window`? Because if I have a thousand records or more, it won't make sense to have to increase this.

---

<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:** [January 3, 2024, 7:38pm UTC](https://discuss.elastic.co/t/scroll-inner-hits-in-elasticsearch/348757/2 "2024-01-03T19:38:58Z")

</div>

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