Components Index

Edit this page

Index

A wrapper component that allows you to configure the credentials and query parameters for the search.

This component automatically provides the search state to all its children.

Usage

Basic usage:

<ais-index index-name="your_indexName"
           app-id="YourAppID"
           api-key="YourSearchAPIKey"
>
  <!-- Add your InstantSearch components here. -->
</ais-index>

Provide search query parameters:

<ais-index index-name="your_indexName"
           app-id="YourAppID"
           api-key="YourSearchAPIKey"
           :query-parameters="{
             distinct: true
           }"
>
  <!-- Add your InstantSearch components here. -->
</ais-index>

Props

Name Type Default Description
api-key String `` The API key
app-id String `` The application ID
index-name String `` The index name
query String `` The search query
query-parameters Object `` The search query parameters. Available options are documented here.
cache Boolean true Whether to cache results or not. See the documentation
auto-search Boolean true Whether to initiate a query to Algolia when this component is mounted
stalledSearchDelay number 200 Time before the search is considered unresponsive. Used to display a loading indicator.
search-client Object `` The search client to plug to InstantSearch

Slots

Name Description
default Can contain anything. All InstantSearch components will have the index injected.

CSS Classes

ClassName Description
ais-index Container class