Algolia Search is a hosted full-text, numerical, and faceted search engine capable of delivering realtime results from the first keystroke.
This extension replaces the default search of Magento with a typo-tolerant, fast & relevant search experience backed by Algolia. It's based on algoliasearch-client-php and algoliasearch-client-js.
See features and benefits of Algolia Search Extension for Magento.
You can check out our live demo:
To setup this module, you'll need an Algolia account. Just sign up here to create an account and retrieve your credentials.
- Create an Algolia Account.
- Download the packaged Community Extension from the magento-connect store
- Install it on your Magento instance.
- Configure your credentials from the System > Configuration > Catalog > Algolia Search administration panel.
- Force the re-indexing of all your products, categories with the System > Index Management > Algolia Search index.
- Force the re-indexing of all your pages with the System > Index Management > Algolia Search Pages index.
- Force the re-indexing of all your suggestions with the System > Index Management > Algolia Search Suggestions index.
Note: If you experience a 404 issue while accessing the Algolia Search administration panel, can follow this procedure.
This extension adds an auto-completion menu to your search bar displaying product, categories & pages "as-you-type".
This extension adds a default implementation of an instant & faceted search results page. Just customize the underlying CSS & JavaScript to suits your shop theme.
If you choose not to use the instant search. The extension will replace the fulltext indexer providing you a typo-tolerant & relevant search experience.
If you choose to use the instant search, when you search for something fulltext indexer replacement is still used so that you can have a backend implementation of the search in order to keep a good SEO
-
Algolia Search: Index every products and categories and is also responsible for updating records when you update/delete products and categories.
-
Algolia Search Pages: Index every pages but do not handle automatic updates. You need to do it manually from time to time.
-
Algolia Search Suggestions: Index every suggestions but do not handle automatic updates. You need to do it manually from time to time.
Once configured, do not forget to trigger the re-indexing in System > Index Management > Algolia Search:
If enabled, every indexing job (global re-indexing, addition/deletion/update of products) will be queued (algoliasearch_queue table).
To asynchronously process those queued indexing jobs, make sure you've configured the Magento cron:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/sh /absolute/path/to/magento/cron.sh
Every indexing job (global reindexing, update of products, deletion of products, update of categories, ...) will happen synchronously. Be careful this can cause php timeout.
Reindexing the Algolia Search re-index all products, categories & pages.
Reindexing the Catalog Search Index will only re-index the products.
Once the extension is installed, a new Algolia Search menu will appear in your System > Configuration > Catalog menu.
This section allows you to configure your Algolia credentials and whether or not you want to enable the auto-completion and/or the instant search results page.
This section allows you to configure what you want in your instant search result page.
You first need to choose a jQuery DOM selector. The content of this selector will be replaced at each keystroke by the most relevant results & facets the Algolia engine will retrieve.
You can choose which attributes to facet on and which attributes to sort on.
You can also choose to replace the default magento category page with a result page with the selected category value checked in the facet bloc. You need to enable the Enable Instant Search Results Page option AND to have the categories
attribute configured as a Facet in the Products Configuration section.
This section allows you to configure how your Product records will look like in Algolia.
List in Attributes all the attributes you need to search, rank and display your products. The order of this setting matters as those at the top of the list are considered more important.
Use the Ranking configuration to specify the numerical attribute used to reflect the popularity of your products. By default, we recommend using the number of ordered quantity as popularity criteria.
This section allows you to configure how your Category records will look like in Algolia.
List in Attributes all the attributes you need to search, rank and display your categories. The order of this setting matters as those at the top of the list are considered more important.
Use the Ranking configuration to specify the numerical attribute used to reflect the popularity of your categories. By default, we recommend using the number of products in the category as popularity criteria.
This section allows you to configure how the static pages of your Magento instance are stored in Algolia.
Use the Excluded Pages to exclude pages you don't want to index.
To customize the autocompletion menu and/or the instant search results page, you can update those 2 files:
Edit /design/frontend/base/default/template/algoliasearch/topsearch.phtml
.
Edit /skin/frontend/base/default/algoliasearch/algoliasearch.css
.
The easiest way to setup your development environment is to use Docker. If you're a Mac user, use boot2docker to run docker containers.
Just run the following script to setup a running Magento 1.9.1 instance with some sample data & the Algolia Search extension installed:
$ ./dev/restart.sh -a YourApplicationID \
-k YourAdminAPIKey \
-s YourSearchOnlyAPIKey \
-p YourIndexPrefix \
-b http://`boot2docker ip`/ # change that if you're not using boot2docker
Administration login is admin
with password magentorocks1
and you can access it from http://[boot2docker ip]/admin
.
A phpmyadmin instance is available from http://[boot2docker ip]/phpmyadmin
You can execute a shell inside the container with the following command:
$ docker exec -i -t algoliasearch-magento /bin/bash
If you do not want to use docker. You can use modman (a module manager for Magento) by running the following commands:
$ cd /path/to/your/magento/directory
$ modman init
$ modman clone https://github.com/algolia/algoliasearch-magento.git