How to change size during scroll

I am running scroll on multiple indexes which are built on timeseries data. I have an index for each day with a common prefix in indexname. Earlier I was giving index name wildcard to serve scroll but since it was using all indices, the performance was very slow.
So for optimization I am trying to implement scroll per index starting from latest index to oldest index. Now I am stuck at a place.

I fetch 10 records per scroll. When I am changing the index when all records of current index are consumed, I don't want to fetch 10 records from new index but just the remaining to make total as 10 records. From next scroll call I would want to fetch 10 records.

I think scroll doesn't provide changing the scroll batch size. Is there any way to handle this?

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