Configure Algolia

Edit on GitHub

Once you have integrated the Algolia app, you can configure it.

Prerequisites

To start using Algolia for your shop, you need an account with Algolia. You can create the account on the Algolia website.

Configure Algolia

To configure Algolia, do the following:

  1. In your store’s Back Office, go to Apps.
  2. In App Composition Platform Catalog, click Algolia. This takes you to the Algolia app details page.
  3. In the top right corner of the Algolia app details page, click Connect app. The notification saying that the application connection is pending is displayed.
  4. Log in to the Algolia website.
  5. On the Algolia website, go to Settings.
  6. Under Team and Access, click API keys.

algolia-keys

  1. From the Your API Keys tab, copy the following keys:
    • Application ID
    • Search-Only API Key
    • Admin API Key
  2. Go back to your store’s Back Office, to the Algolia app details page.
  3. In the top right corner of the Algolia app details page, click Configure.
  4. In the Configure pane, fill in the APPLICATION ID, SEARCH-ONLY API KEY, and ADMIN API KEY fields with the values from step 7.

algolia-settings

  1. Click Save.

The Algolia app is now added to your store and starts exporting your product data automatically.

Info

You need to wait for a few minutes until Algolia finishes the product export. The more products you have, the longer you have to wait. The average export speed is around 100 products per minute.

Verification

Verify that your index is populated with data from your store:

  1. Go to the Algolia website.
  2. In the side pane, go to Search > Index.
  3. Make sure that the index is populated with data from your store.

algolia-index-data

For details about the created index data, see Indexes.

Optional: Adjust Algolia configuration

The default Algolia app configuration mimics the default Spryker search configuration. However, you may want to adjust some of those settings to your needs.

Overview of searchable attributes

algolia-searchable-attributes

Algolia’s Searchable attributes configuration determines which attributes are used to find results while searching with a search query.

Default fields for searchable attributes are the following:

  • sku
  • name
  • description
  • keywords

Adjust the searchable attributes list

  1. In the side pane, go to Search > Index.
  2. Open the Algolia indices list and find all primary indices.
  3. On the Configuration tab, select Searchable attributes.
  4. To adjust the Searchable attributes list, add and remove needed searchable attributes.
  5. Click Review and save settings. This opens the Review and save settings window.
  6. Enable Copy these settings to other indices and/or replicas and click Save settings.

Overview of facets list

algolia-facets

Algolia Facets configuration determines which attributes are used for search faceting.

Default attributes for faceting are as follows:

  • attributes.brand
  • attributes.color
  • category
  • label
  • prices
  • rating

The prices attribute is an object with nested fields. Algolia creates facets for each nested field and creates facets for all the currencies and pricing modes available in product entities.

Add new attributes for faceting

  1. In the side pane, go to Search > Index.
  2. Find all primary indices.
  3. On the Configuration tab, select Facets.
  4. To adjust the Attributes for faceting list, add and remove attributes.
  5. Click Review and save settings. This opens the Review and save settings window.
  6. Enable Copy these settings to other indices and/or replicas and click Save Settings.

Custom ranking and sorting

algolia-ranking

Algolia’s Ranking and sorting configuration determines which products can be shown before others when customers search your catalog. Spryker creates a Popularity index where you can use Product properties as ranking or sorting attributes. Learn more about Custom Ranking and Sorting in the Algolia documentation.