Online businesses are constantly competing to provide their customers with the best online shopping experience. They create high-performance websites, targeted marketing campaigns, offer high-quality products and next-day deliveries. In other words, they do everything possible to attract customers and keep them coming back for more.
But they often overlook a crucial factor on their website that contributes to the buying experience: catalog search functionality.
At its core, the catalog search is just a way for customers to find the products they’re looking for. But it also influences website usability and conversions significantly.
A study by Forrester Consulting revealed that nearly 80% of customers abandoned their purchases or bought from a competitor due to a poor shopping experience. They attributed their change of mind to factors like difficult navigation and inaccurate search functionality.
Magento provides merchants with the ability to offer advanced search functionality on their stores. In this article, we’ll help you understand how Magento’s catalog search functionality works and how you can make it more effective to boost your website’s user experience.
How the Magento 2 catalog search works
Contents
Until the release of version 2.3, Magento used the MySQL database to handle catalog search queries. While the database search solution was adequate for testing and development, it lacked the functionality and scalability desired by most enterprises.
Magento was always known for being a feature-rich and dependable platform ideal for medium and large businesses. But it lacked a reliable catalog search engine.
Therefore, merchants relied on Magento services and third-party solutions like Apache Solr and Sphinx to improve their website catalog search functionality.
Noticing this trend, Adobe introduced support for Elasticsearch with the release of Magento version 2.3. Elasticsearch is a powerful, open-source search and analytics engine based on Apache Lucene.
Introducing it to Magento allowed users to leverage the power of a scalable search engine that supports multitenancy and offers near real-time search results straight out of the box.
Elasticsearch takes in raw data from the catalog and stores it in an “inverted index” to improve the efficiency of the search querying process. Using an inverted index, Elasticsearch only needs to look for a term once to return the entire list of documents associated with it.
Here’s a quick example to help you understand how it works:
Suppose you have a store that sells T-shirts, jackets, and sweatshirts. Here’s how Elasticsearch would store your catalog data in an inverted index:
Term | Documents |
cotton | T-shirt |
polyester | Jacket |
poly-cotton | Sweatshirt |
green | T-shirt |
red | T-shirt, Jacket |
blue | Jacket, Sweatshirt |
small | T-shirt, Sweatshirt |
medium | T-shirt, Jacket, Sweatshirt |
When a customer searches for the term ‘small’ on your store, Elasticsearch would instantly return all documents associated with the term, i.e., T-shirt and Sweatshirt.
Elasticsearch does more than performing text-based search queries. It is also responsible for supporting other catalog queries in Magento 2, including those for category products and the filtered navigation product lists.
Thanks to its distributed architecture, Elasticsearch can efficiently analyze, index, and search vast volumes of data. When used with Magento, it delivers advanced search capabilities while also improving website performance.
Five ways you can make Magento catalog search more effective
1. Use Elasticsearch
Since the release of version 2.4, Magento no longer supports the MySQL-based search functionality. It requires Elasticsearch as its default catalog search engine. But if you’re using Magento 2.3.x, it’s likely that you’re still using the default MySQL search functionality.
And if that’s the case, the first step to improve your Magento catalog search functionality will be to adopt Elasticsearch. Familiarizing yourself with new technology might seem intimidating, but it’s worth the effort.
Besides delivering quick and advanced search functionality, Elasticsearch provides Magento users with:
- Support for multilingual search,
- Support for synonyms and stop words,
- A horizontally scaling architecture,
- And real-time search data.
But before you switch from MySQL to Elasticsearch, you must install and configure it to work with your web server. Adobe provides separate guides to help Apache and Nginx users configure their Magento stores to communicate securely with Elasticsearch.
Despite their detailed guides, things can get out of hand quickly. Both Elasticsearch and Magento are complex applications. So if you need help with configuring your Magento search engine, you can contact us for assistance.
2. Audit your catalog search regularly
Magento allows store managers to analyze catalog search terms through the admin panel. You can use this feature to discover what your customers are searching for on your website.
You can access the Search Terms Report in the Magento admin panel by navigating to Reports > Marketing > Search Terms. This report will show you the number of search results for each term and how many times customers searched for it.
You can filter the report by the search query, store, number of results, or hits. You can also export the report to a .csv file for further analysis. Once you’ve identified the most popular search terms on your store, there are several ways you can capitalize on them.
If you find that your customers are searching for a product you don’t offer, you could consider adding it to your catalog.
Suppose your customers are searching for a product that’s similar to a product in your catalog. In that case, you could consider redirecting them to the product or category page of that search term to help them find similar products quickly.
3. Add search terms
As you continue to analyze search queries on your store, you will discover different terms used by your customers to find products in your catalog.
To help them locate those products or related products, you can create redirects for search queries on your website that lead customers to a landing page or matching products in your catalog using the ‘Search Terms’ feature in Magento.
To add a new search term to your store, follow these steps:
1. Navigate to Marketing > SEO & Search > Search Terms in the Magento admin panel and click on “Add New Search Term.”
2. In the “Search Query” box, add the term or phrase you want to add.
3. Select the applicable store view for the search term.
4. If you want to redirect customers to a specific page on your store, enter the target URL in the “Redirect URL” field.
5. If you want this term displayed as a suggestion in the absence of search results, you can set “Display in Suggested Terms” to “Yes.”
6. Finally, click on “Save Search” to complete adding the search term.
4. Configure Elasticsearch stopwords
Stopwords are commonly used words like “the, a, an, in” that don’t add much value to a sentence. Search engines are programmed to ignore while indexing entries and retrieving them in response to search queries.
Back when disk space and memory were expensive, every kilobyte was precious, and saving space and memory resulted in better performance. Although storage and memory are more accessible and more efficient compression algorithms exist today, Elasticsearch still uses stopwords to improve search performance.
Unfortunately, you cannot manage them through the admin panel. Instead, you need to access a .csv file located in one of the following two locations (depending on how you installed Magento):
1. <magento_root>/vendor/magento/module-elasticsearch/etc/stopwords,
2. or <magento_root>/app/code/Magento/Elasticsearch/etc/stopwords/ directory.
The default Magento installation contains a single .csv file containing stopwords for the default locale and an additional stopwords.csv file for any locales not represented.
For example, if your website only sells bags and you have a catalog of thousands of products, you could consider adding the word “bags” as a stopword. Because it’s a general, high-frequency term, in this case, it won’t add value to your catalog search.
When a customer searches for “faux leather bags,” it will retrieve the entire catalog because of the word “bags.” Therefore, it’s better to add it as a stopword to improve your catalog search.
5. Create search synonyms
Another way to improve the effectiveness of your Magento catalog search is to include matching terms that your customers might use to describe products.
It can be anything, from misspelling a product to spelling it differently or using a synonym. Your customer might even use a wide range of terms to describe a single item.
You shouldn’t lose a sale when a customer abandons their purchase after looking up “hoodies” on your website and seeing no results because your products are listed as “sweatshirts” or “fleeces.”
Setting up synonyms on your website can help you avoid losing sales and help your customers find products quickly.
To create search synonyms through the Magento admin panel, follow these steps:
1. Navigate to Marketing > SEO & Search > Search Synonyms. If it’s your first time creating search synonyms, this section will be empty.
2. Click on “New Synonym Group” to create a group of synonymous words.
3. Define the scope of the synonyms by selecting the store views where you want the synonyms to apply. If you’re operating a single store, you can leave it as the default entry “All Websites.”
4. Next, enter each synonym separated by a comma in the “Synonyms” section. Enter all the words your customers might use to describe a single product. Referring to the search report for insights can be helpful.
5. You can also merge this synonym group with an existing group if they share the same scope.
6. Finally, click on “Save Synonym Group” to complete.
Improving Magento catalog search in an ongoing process
You can make your Magento catalog search more effective by following these five easy steps. It’s important to remember that optimizing catalog search functionality is an ongoing process. Your website search is a great way to gain insights into your customers’ preferences.
As your business continues to grow and customer demands change, the data generated by your catalog search engine will help you keep up with changing customer trends and stay a step ahead of your competition.
Implementing an effective Magento catalog search solution on your website will help you improve customer experience, increase customer retention, and inspire lasting customer loyalty.