One InstantSearch Multiple Configuration

Hi. i want to create multiple hits with each configuration in one instantsearch. example :

<InstantSearch>
  <Index indexName="mydatas">
    <h3>Campuses</h3>
    <Configure distinct={true} />
    <Hits />
  </Index>

  <Index indexName="mydatas">
    <h3>Majors</h3>
    <Configure distinct={false} />
    <Hits />
  </Index>
</InstantSearch>

The both result above have similiar result, namely hits with configure distinct is false. I want the “campuses” results are distinct, and “majors” results aren’t distinct.

Thanks.

Hi @maukuliah,

Indeed, it is not possible to use this multi-index search syntax to run two separate queries in the same index.

If you would like to run two different queries on the same data, you could create a replica of the first index and run the second search in the replica: https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/creating-replicas/.

Let us know how it goes!