The default search system for Magento is Solr; it uses the Lucene Java search library for full-text indexing and search. The system meets the basic searching needs of the visitors, but, unfortunately, it does not provide high-quality relevant results at the desired time. Sphinx search Magento is an alternate way to set up a search for your store.
Create a search engine for your Magento store
Add search to Magento store
Configuring a search engine from scratch using Sphinx is never advised. That would be a terrible way to use your resources while you could go for a more ready-made solution instead. Here is one such solution.
Take a look at ExpertRec’s Magento search plugin and Magento 2 search plugin. This will add a search to your store that gives all modern perks like voice search, auto-complete, live suggestions, and much more. It also has support for advanced search.
If the plugin method does not work out as expected then try the crawl based method.
- Navigate to https://cse.expertrec.com/newuser?platform=cse and signup with your Google ID.
- 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.
- 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.
- 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. Getting advanced Magento search with ExpertRec is among the easiest ways out there. You can configure the search behavior in the ExpertRec control panel to get the desired performance without any coding.
Sphinx search Magento extensions
If you do wish to add sphinx search to Magento then you can try the sphinx search extensions out there.
Here are some reasons why to choose Sphinx among all other search engines:
-
Speed: Regular MySQL searches take more time to perform compared to Sphinx search. It is quite easy to notice the dramatic difference once you have millions of records in the database.
-
High Relevancy: Sphinx provides more relevant search results with the help of state of the art relevancy ranking algorithms. It ranks exact matches higher, considers keyword frequency, and also analyzes proximity.
-
Enabled stemming: It shows the same results for singular and plural forms of the word.
-
Wordforms: Sphinx normalizes the spelling variations, abbreviations, synonyms, etc.
-
Various search features
The drawback is that configuring it to your liking can be quite difficult and that is why the former method is recommended.