Instantsearch.js with multi index search and sharing searchbox and facets (refinementlists)

I currently have Algolia instantsearch.js for vanilla javascript setup for 2 indicies. It is currently working well, where I have one search box and 2 results sections to display result - using this example - . I have the same filters for each index and wish to implement facets using the refinementList widget for the search in a similar way, I currently using this code adapting the example above, but not having any luck:

searchFunction: function (helper) {
  subindex.helper.setQueryParameter('disjunctiveFacets', facets).setQuery(helper.state.query).search();;

Hi Peter, welcome to the community and thanks for your post!

I was able to modify this codesandbox to hook up two indices to the same search box and to the same refinement lists. See lines 46 - 66 on app.js –
you were definitely on the right track in looking to modify the helper!

Let us know if you have any trouble implementing this.