Overview
Multi-index search allows you to:- Search multiple indices with a single query
- Display different result types (products, articles, categories)
- Apply index-specific filters and refinements
- Maintain separate pagination for each index
- Share search state across indices

Use Cases
E-commerce
Search products, categories, and help articles together
Content Sites
Query blog posts, documentation, and FAQs simultaneously
Media Libraries
Search videos, images, and audio files in one interface
Marketplaces
Find listings, sellers, and categories together
Implementation
React Example with Index Component
- Basic Setup
- Hit Components
- Index-Specific Filters
Use the
Index component to query multiple indices:JavaScript Example with index() Method
React SSR Multi-Index Example
From the actual SSR example showing multi-index search:Shared vs. Scoped State
Shared State
Some UI state is shared across all indices:- Query: The search query applies to all indices
- Routing: URL state can sync all indices
Scoped State
Other state is scoped to specific indices:- Filters: Each index has independent refinements
- Pagination: Separate page numbers per index
- Configuration: Different hitsPerPage, etc.
Performance Considerations
Request Batching
InstantSearch automatically batches requests to multiple indices:Conditional Rendering
Only show secondary indices when there’s a query:Routing with Multiple Indices
Sync multiple indices with URL state:Layout Patterns
Tabbed Interface
Switch between indices with tabs:Carousel Layout
Show each index in a horizontal carousel:Running the Example
Customization Tips
Add result count per index
Add result count per index
Use the
Stats widget to show how many results each index returned.Implement 'See All' links
Implement 'See All' links
Add links to dedicated pages for each content type when there are many results.
Prioritize index display
Prioritize index display
Show indices with more results first, or hide indices with zero results.
Different layouts per index
Different layouts per index
Use grid for products, list for articles, etc.
Related Examples
- E-Commerce Search - Single index patterns
- Next.js SSR - SSR with multiple indices
- Routing - URL sync for multi-index
Source Code
React SSR Example
View the multi-index SSR example on GitHub