Union + deduplicate

Right, the techniques in Union + current syntax will chain multiple Sets end-to-end rather than interlace them together.

There is a .distinct() method for Sets. It will scan the entire Set to produce results, so you don’t typically want to use .distinct() with pagination. Instead, you might consider using .toArray() along with it. E.g. set1.concat(set2).distinct().toArray()

If the Set is indeed large enough that pagination is required, then you may need to deduplicate results in your client application.