Configure your search
After you have synchronized your data to Algolia, you can configure your search for optimal relevancy.
You can do this in the Algolia dashboard, on the details page of your indices. In the Algolia dashboard, you should see your newly created indices, which follow the following naming pattern:
The total number of indices created depends on the number of locales your site supports.
Configure your searchable attributes
When setting up and configuring your index, the first step is to decide which attributes you want to use for searching. Add them by going to Configuration > Searchable attributes. For more information see Searchable attributes.
Configure your facets
First, define the attributes you want to be available as facets in the Configuration > Facets tab on the Algolia dashboard. We recommend to add at least the following attributes:
- The price attribute related to each currency your site supports. For example, if your site is using USD and EUR, add
Facets relevant to your products, such as
Configure your replicas
You can use replicas to let your users sort search results in different ways, such as sorting by price in ascending and descending order. To create the replicas for sorting on price:
- Select your products index and go to Replicas.
Create 2 replicas:
This adds two new indices to your app.
Configure each replica to sort by price.
You can add as many replicas as you need, depending on the number of locales your site supports or other sorting strategies you want to offer. Just make sure your usage of Algolia falls within the limits of your plan.
Now you’re ready to test your search on your store front.