Multi Index search for Magento 2

I have a scenario for Instant Search for Magento 2.

We have two Stores. Store-A and Store-B.

If customer is on Store-A, search should show items from Store-A only.
If customer is on Store-B, search should show items from Store-B in one section and Items from Store-A in separate section.

How can it be achieved, if possible at all.


Hi @muhammadsaleem,

You can do multi-index search using the “index” widget. This allows you to use the same query, but different result sets per index. You can read about that approach here:

You can also find more about that in the docs under “federated search” or “multi index search”

Note that this means that you will need to write custom code and won’t be able to configure this from the Magento dashboard.

Hope that helps!