How to best provide index-specific results in separate tabs with multi-index search while maintaining routing, pagination

We’ve recently decided to extend our search experience by including results from an additional index, such that users can search across a content index and a directory (people) index. We’re using InstantSearch.js to build the UI and I have the basic components in place so that we’re now successfully searching across both indexes.

I’d like to know if there is a way that we can provide a similar experience to Algolia’s own search page where users can switch between different tabs, e.g. All, Website, Resources, and so on – and, in our case, switch between results for the two indexes. We’d like to maintain pagination and routing in the same way that we did for our original single-index search experience. Ideally, routing would capture the active tab and the pagination page, similar to what I see in the routing state management for Algolia’s search, e.g., /search/?query=api&tab=website&website[query]=api&website[page]=2.

One way I was thinking of hacking this is to provide a field to each index’s structured data that would identify the index – for example, sourceIndex: content and sourceIndex: directory and then use this for faceting. However, I’d like to know if there’s a way that we can use the existing indexes’ data structure and leverage the tools Algolia provides out of the box.

Many thanks in advance!