Skip to main content
After synchronizing your data to Algolia, configure your search for optimal relevancy. You can do this in the Algolia dashboard, on the details page of your indices. You should see your newly created indices, with the following naming pattern:
  • ${hostname}__${site-id}__products__${locale}
  • ${hostname}__${site-id}__categories__${locale}
  • ${hostname}__${site-id}__contents__${locale} (optional)
The total number of indices created depends on the number of locales your site supports. Screenshot of a table showing two indices with labels 'hostname', 'site ID', and 'locale' highlighting their respective values. When you assign Algolia cartridges to a site, they automatically support all the locales the site uses. You can customize the list of locales with the Locales for indexing custom preference or the localesForIndexing job step parameter.
Indexing many locales can affect runtime.

Configure your searchable attributes

Decide which attributes to make searchable when setting up your . Add them in the Configuration > Searchable attributes section of the dashboard. For more information, see Searchable attributes. To begin with, consider adding the following attributes: categoryPageId, name, short_description, and long_description. Screenshot of the 'Searchable attributes' section with a list of attributes and an input field to add more.

Configure your facets

Define the attributes you want to be available as facets in the Configuration > Facets tab on the Algolia dashboard. You should add at least the following attributes:
  • The Algolia cartridges support all the currencies your site uses. The price attribute relates to each currency. For example, if your site is using USD and EUR, add price.USD and price.EUR.
  • __primary_category.0, __primary_category.1, __primary_category.2 to show the category hierarchy in the search results.
  • categoryPageId to create category pages.
  • Facets relevant to your products, such as brand, size, and color.
The actual facets depend on your attribute names and your record model. For example, if you choose the base product-level or attribute-sliced record model, some facets would become variants.price.USD, variants.size, variants.color.
Screenshot of the 'Configure your search' page, showing the 'Facets' section with attributes like '__primary_category.0' and 'brand', each with a 'not searchable' drop-down menu and delete icon. Different category levels are represented by the corresponding __primary_category attributes. These attributes are suitable for hierarchical faceting in Algolia, such as Women > Dresses > Evening Dresses: __primary_category.0, __primary_category.1, and __primary_category.2.
With faceting, Algolia offers capabilities that are similar to Salesforce product variation grouping.

Configure results grouping

Results are grouped by default when you use the base product-level record model. For the variant-level record model, if your catalog is large, it’s common practice to group related variants in the results by displaying one result per base product. To do that:
If you enable results grouping, you should add color swatches so users can see the different color variations.

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:
  1. Select your products index and go to Replicas.
  2. Create two replicas:
    • hostname__site-id__products__price_USD_asc
    • hostname__site-id__products__price_USD_desc
    Screenshot of the 'Replicas' section in the Algolia dashboard, showing a list of existing replica indices and a button to 'Create Replica Index'. This adds two new indices to your app. Screenshot of the 'Indices' page showing a list of indices with two newly created replicas highlighted and labeled 'User newly created replicas.'
  3. Configure each replica to sort by price. Screenshot of the 'Replicas' config page showing 'price. USD' as the sort-by attribute and a warning about no custom ranking.
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.
Last modified on February 18, 2026