Styla uses Algolia as a search engine to let shoppers find products, categories and content you created in Styla.
For it to work you need to have an account at Algolia and share with us some of the account details. We can then establish the connection to sync data with Algolia and deliver the search results.
First, set up Algolia:
-
Create a new account with Algolia (or use an existing one you already have)
- In Algolia, create a new config/index that Styla should use.
- Follow these instructions in the Algolia help centre for more information.
- Note down the index name you chose, you will need it later.
-
Set up Attributes for Faceting:
-
Select your index (the one that will be used by Styla) and go to the Configuration tab
-
Select Filtering and Faceting → Facets
-
In "Attributes for faceting" add
entity_type
-
Leave the dropdown to "not searchable"
-
Review and Save
-
-
Set up Deduplication and Grouping:
-
Select your index (the one that will be used by Styla) and go to the Configuration tab
-
Select Search Behavior → Deduplication and Grouping
-
Set "Distinct" to false (should be already by default). NOTE: this doesn't affect our functionality, but it's recommended when using the search from the Algolia UI
-
In "Attribute" for distinct select
entity_type
-
Review and Save:
-
Second, Share Algolia API Key details with Styla
We will need:
-
-
- The name of index you just created in the steps above
- The application ID - Identifier of the application.
- The Search API Key - the API Key used by the frontend for read-only access to deliver search results.
- The Write API Key - the API Key used by our backend for writing the searchable data.
- This will not be exposed in any of our publicly accessible services.
-
You can find this information as follows:
- Login to Algolia, if you aren't already
- Go to your Overview -> API Keys. (Or Settings -> API Keys)
- Copy and paste into an email the values for
- Application ID
- Search API Key
- Write API Key
- Write the name of the index you used in the first part into the email
- Send the email to your contact at Styla.
Third, Styla will configure your account with the above information
- We will connect your Styla storefront to your Algolia account
- We will create the search results page
- We will add the search bar element into your header
- We will contact you, once the search is configured
As soon as we got back to you, you would have to fill in the values, which you want to be filtered/found in the search.
Fourth, you have to add searchable attributes:
- Select your index (the one that will be used by Styla) and go to the Configuration tab
- Select Relevance Essentials → Searchable attributes
- Add the searchable attributes (for e.g. (page)title, path, description...)
- Review and Save:
Done
Once the above are configured, Styla automatically pushes any content updates relevant for search results to Algolia via its API. This happens for:
-
-
Products
-
Categories
-
Content pages created in the Styla editor.
-
Algolia indexes this content and returns search results to Styla via the API. Updates triggered by BigCommerce or Styla Editor should be visible on your search results with a short delay
Comments
0 comments
Please sign in to leave a comment.