Multiple indexes, different facets

I have an index that contains people and guides. I want to search both indexes using a single input.

People are the primary content that is being searched, with filters exposed.
Guides are the secondary content, with no filter options.

I followed the instructions here: https://www.algolia.com/doc/guides/building-search-ui/resources/ui-and-ux-patterns/in-depth/multi-index-search/js/

This works, but I am running into an issue:

  • when I search, everything works as expected
  • when I select a facet (for example city) it filters down the list of people, but no guides are displayed anymore, because none of them have a city field.

Is there a way to search through the two types of content in the index without selecting a facet filter resulting in no guides being shown?

Does this require a different strategy than the one outlined in the documentation?

^ entering keywords works as expected

^ when selecting a filter, no guides are displayed, as they do not have the selected facet.

Hi there,
Thanks for reaching out to us.

I don’t know how you implemented it, but I guess you need to change the hierarchy of your indices.

root index
    ㄴ people index
    ㄴ guides index

The two indices should be siblings so that they don’t affect each other.

Let me know how it goes and if you have any question.