Index
About this widget
You are currently reading the documentation for React InstantSearch V6. Read our migration guide to learn how to upgrade from V5 to V6. You can still find the V5 documentation for this page.
Index
is the component that allows you to apply widgets to a dedicated index. It’s useful if you want to build an interface that targets multiple indices.
This pattern is also called “Federated Search”, more information can be found in the guides dedicated to it.
The position of index
in the widgets tree impacts which search parameters are applied. Search parameters created by widgets are forwarded to their child index
widgets.
Examples
1
2
3
4
5
import { Index } from 'react-instantsearch-dom';
<Index indexName="instant_search">
{/* Widgets */}
</Index>
Props
indexName
|
type: string
Required
The index to search into. |
||
Copy
|
|||
indexId
|
type: string
default: value provided for indexName
Optional
An identifier for the index. Providing an |
||
Copy
|