Installing the Algolia Plugin
Algolia is a search and recommendation engine API you can integrate into your Builder app using the Builder Algolia plugin.
The Builder.io Algolia plugin sends page data from the Builder.io API to a configured Algolia Index.
Below is an example of the payload that is delivered to Algolia. You can set up filters or facets from this payload.
Adding the plugin
To add the plugin to your site, navigate to your Builder space and access account settings.
In the list of settings, click the pencil icon next to Plugins to add the Algolia Plugin.
👉 Tip: Note: If you don't see these settings, you may need to request access from your Builder administrator.
Next, add the new Algolia plugin by typing the following command into the Edit Plugins dialog shown below.
Adding your API keys
Open your Algolia Dashboard and navigate to your Account API Keys.
The first key that you will need is your Application ID. You will find it on the main API Keys page.
You will need to create the second key in the All API Keys tab. This is what Algolia calls a Restricted Key. Be careful with this key as it enables permissions for features besides search.
After selecting the All API Keys tab, click the New API Key button to open a modal dialog for creating your new API Key.
For this key you will need to add items to the access control list (ACL). Add search, addObject, and deleteObject. These allow Builder.io to connect to Algolia and make changes to your index. If you want to choose a specific index you can also select your Index under Indices.
Now that you have the correct keys, you can return to Builder.io and edit your Algolia plugin to include these new keys.
Your pages will now sync with Algolia any time they are published or unpublished.
Making changes to your plugin
If you ever have trouble with the plugin, or you would like to remove the integration you can always access the plugin settings to make changes. You can also purge your index on Algolia.
There are settings on your model type page that will allow you to re-sync or remove the webhook that's called.
Builder.io Algolia plugin GitHub repo
You will always find the most up-to-date code for the Algolia Plugin on our GitHub Repo.