Configure Algolia
Edit on GitHubThis document explains how to connect your Algolia account to Spryker and configure data export.
Prerequisites
- To sign up for Algolia, contact your Customer Success Manager.
- Integrate the Algolia app
Configure Algolia
- In your store’s Back Office, go to Apps.
- In the App Composition Platform Catalog, click Algolia to open the Algolia app details page.
- In the top right corner of the Algolia app details page, click Connect app. A notification will appear indicating that the application connection is pending.
- Log in to the Algolia website.
- On the Algolia website, go to Settings.
- Under Team and Access, click API keys.
- In the Your API Keys tab, note the following keys:
- Application ID
- Search API Key
- Admin API Key (Write API Key with permission to create indexes also works)
- In the Back Office, return to the Algolia app details page.
- In the top right corner, click Configure.
- In the Configure pane, enter the values you retrieved in step 7 for APPLICATION ID, SEARCH API KEY, and ADMIN API KEY. These keys are only required to start data export to Algolia.
- Use Algolia instead of Elasticsearch for products: Select this option to use Algolia as the search engine for products instead of Elasticsearch. This setting is optional and can be enabled later.
- Use Algolia instead of Elasticsearch for CMS pages: Select this option to use Algolia as the search engine for CMS pages instead of Elasticsearch. This setting is optional and can be enabled later.
- If your store model includes products without prices, select Products without prices. This setting is used for the initial index setup in Algolia and cannot be changed later. Select this only if products without prices can exist in your application.
- Optionally, to enable search in Spryker for other entities (such as Docs, Blog, or any custom entity), select Use Algolia instead of Elasticsearch for other entities.
- Click Save.
The Algolia app is now added to your store and begins exporting product and/or CMS page data. To be exported, a product must meet the following requirements:
- The product is
approved
andisActive
. - The product has
prices
, unless Products without prices is selected.
Depending on the size of your product catalog, Algolia may take from a few minutes to several hours to export it. The average export speed is 300 products per minute.
Verify that your index is populated with data from your store:
- Go to the Algolia Dashboard website.
- In the side pane, go to Search > Index.
- Ensure the index is populated with data from your store.
For details about the created index data, see Indexes.
Additional configuration: Use Algolia for other entities
The setting Use Algolia instead of Elasticsearch for other entities allows you to enable Algolia search for entities beyond products and CMS pages, such as Docs, Blog, or any other custom entity from your Spryker application.
This is useful if you already have indexes in Algolia created manually, by other integrations, or by Algolia Crawler.
It allows you to integrate custom search for Spryker Yves and Glue API applications in the same way as for products and CMS pages,
using spryker/search
and the Algolia ACP adapter from the spryker/search-http
module by adding custom plugins.
(All fields are required.)
When you enable this setting, you need to provide the following information for each entity you want to enable Algolia search for:
- Entity Name: The custom entity name, which is also used as
sourceIdentifier
inSearchHttpQueryPlugin((new SearchContextTransfer())->setSourceIdentifier('document'))
. - Store: The Spryker store name where the search will happen. Use ‘*’ if all stores should use the same Algolia index.
- Locales: The locales for which the index will be used, for example
en_US,en_GB
, or ‘*’ if all locales should use the same Algolia index. - Algolia Index Name: The name of the Algolia index that contains the data for this entity, for example
documents_en
.
Thank you!
For submitting the form