Scroll inner_hits in Elasticsearch

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.

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