One pagination across multiple indices?

Hi,

I have two indices in Algolia, example: one for books and one for movies. I need to support listing all items under those indices and also searching in those indices, but I want the response to be combined, with sorting and pagination applied to the combined result. Is there a way to achieve this without storing different types of objects in one index?

I checked this example, Search multiple indices API Reference | Algolia, but hitsPerPage defines how many hits from this particular query. What if I want pagination to ensure consistent across all indices.

Storing 2 different types of objects in one index would solve, but I am not sure if this is a correct approach, I feel it would be cleaner if I can store them separately.