Algolia Magento 2

[Magento2] Algolia Magento 2

Rate this article

Share this article

For any Magento store, the search is a critical component. The fastest way to improve conversions is to have a robust search engine powering your store. Magento 2 search settings are not that easy to configure and seldom gives satisfactory results.

Algolia Magento 2


Add Search to your Website

One option is to build a search is by using Algolia Magento 2. As it is with Algolia, this will take some coding effort to customize. Another option that will be explored is to use an alternative that will give the same features but can be more easily customized without any coding effort.

Building a search using Algolia Magento 2 instant search

Selling your products online with Angolia’s Instant Search extension for Magento 2 takes more effort than they claim. The responsive extension allows your customers to enter their searches and acquire results in real-time. However, to configure it to this state will take some effort upfront. 

Before using Algolia with Magento, the user must create an Algolia account. Algolia can be installed from Magento Composer using the command mentioned below –

> composer require algolia/algoliasearch-magento-2

After installing Algolia, update the Application ID key, Search-only API key, and Admin API key in Magento (Navigate to Stores > Configuration > Algolia Search in Magento Admin for Algolia related configuration).

After Algolia is installed and configured, define the attributes (facets) that will be searchable on the website.

After completing the facet configuration, clean the cache from Magento admin.

Upload Magento data on Algolia servers and index them to become searchable. The indexing queue processes updates to products, categories, pages, and any other data by synchronizing updates to Algolia servers.

To run the queue managers, asynchronously configure Algolia queue and schedule crons as mentioned below:

To enable the indexing queue, navigate to System > Configuration > Algolia Search > Indexing Queue/Cron in Magento administration.

For indexing of new products, set the following indexing commands set in the cron:

php bin/magento indexer:reindex algolia_products

Schedule a cron to send catalog updates to Algolia at the desired frequency (generally scheduled every 5 minutes)

php bin/magento indexer:reindex algolia_queue_runner

This crontab will run every five minutes, running the number of operations set in the configuration (10 by default).

Once the above configurations are complete, the products, attributes, categories, and suggestions that are configured on Algolia can be searched in real-time.

As you can see, the entire set up is directed more towards developers and is not so user-friendly for store owners. The next method is more straightforward and involves no coding.

Building a Magento instant search using ExpertRec

ExpertRec is an Algolia Alternative. Aimed at store owners who need not have coding experience, ExpertRec’s Magento Plugin can be used to integrate instant search to your store. Here is how:

  1. Download and install the extension from Magento Marketplace.
  2. Your default search box will be replaced automatically.
  3. You can customize the UI and change the search ranking algorithm from the dashboard without any coding.

Add Search to your Website

Bonus Method: Algolia Magento 2 Alternative

In case the plugin method does not work, you can still add a search to your Magento store using this method.

  1. Navigate to and signup with your Google ID.
  2. Enter your website’s URL when prompted. You can select a server location near you and add the URL of your sitemap if you wish to. These will be auto-detected otherwise.
  3. You can play around with the settings and customize the UI as the crawl runs. Once it is complete, you can check out a fully functional demo before taking the search to your website.
  4. You can take the search to your website with little to no effort. All you need to do is to paste the code snippet available on the dashboard on your website.

ExpertRec comes with more customization options that you can explore. You can read this article to find a more detailed guide on the installation and configuration.

Add Search to your Website

Are you showing the right products, to the right shoppers, at the right time? Contact us to know more.
You may also like