As per multiple studies, the customers who use the search navigation of your Magento store have higher conversion rates than any other interaction. It is also rational because these people have already defined requirements and know what they want, thus if they get what they want they will make a purchase. Anyway, the outcomes hugely depend on the search results, whether they are relevant and quick or not.
The search process of your store may be an exhausting one because, in MySQL default, there can be tons of irrelevant search results, show no results because of typing errors, or can’t search by certain attributes. That’s why you may observe the issue of: There is a lot of traffic yet the conversion rate is quite low. To eliminate this problem you have to delve into the search functionality of your Magento 2 store and resolve any arising issues.
The Magento search optimization path depends on the search solution used in your Magento store. You may be using either the native MySQL search of Magento, ElasticSearch, or any 3rd party search mechanism. In this article, we will go through the complete mechanism of how to improve search in your Magento store in all the cases.
Why is the Search Mechanism related to User-friendliness? Important Statistics
Consulting companies and e-commerce development companies have always studied the importance of search functionality in e-commerce sales. Here is some important data:
- As per Forrester’s report, 43% of the incoming online traffic first interacts with the store through the search function.
- The users who use the search functionality are 2.4 times more likely to get converted. Also, those who use the search function spend 2.6 times in comparison to those who don’t.
- A poor search engine is more harmful than a slow-running website. Nearly 80% of the buyers leave e-commerce stores due to irrelevant search results, tangled navigation, and insufficient product information.
These figures highlight the importance of search functionality for both buyers and businesses. Thus, we will dive into the different strategies and tactics to improve Magento 2 search results.
First Step: Accelerate the Magento Search
Assume that the search for your products & catalogue has already been set up and now you are facing issues with the search speed. Then, you are required to take steps to improve search speed as a fast-loading and fast-searching website is capable of delivering a good user experience. But how to improve search speed? Well, it depends on the type of search being utilized in your Magento 2 store. There are 3 major cases, and we will study all.
1. MySQL Search:
MySQL is the default search option in Magento for up to Magento 2.4, and a lot of users use this default functionality. MySQL is a database that stores all the data & processes of the platform which includes much more than a search like product and catalogue pages.
If the size of your store is small and doesn’t have a lot of traffic i.e. one visitor in 5 minutes then this functionality may be enough. Otherwise, it may give multiple problems related to search speed. There can be multiple reasons for MySQL’s slow search speed in Magento.
a. Mistakes in the code:
Whenever a user makes a search operation on a Magento store, it performs some unnecessary operations like extra table joins. This data is irrelevant to the search and it takes time to analyse it. Due to this, each search request runs longer and takes a couple of extra seconds.
To eliminate this issue, the developers have to re-examine and optimize the code. A profiler will help to find chunks of code that take longer to execute.
b. Overload queries in the database:
When there are hundreds of users searching on the Magento, the MySQL search gets overwhelmed which leads to the slowdown of the website. In such cases, the best way is to pass the search to another server(s). There are many options, however, the most popular one is Elasticsearch which we will talk about later.
2. ElasticSearch:
For Magento 2.4+, the Elasticsearch replaced the existing MySQL default search and became the new default search for Magento. But why? Because Elasticsearch is quite faster than MySQL and quite flexible for tweaking.
Also, it exonerates Magento from handling the additional search functionality. The search queries are considered heavy because they have to meet numerous criteria. Adobe removed the search logic to free MySQL and optimize the overall Magento speed. Apart from this, the Magento developers also prefer to install Elasticsearch on a separate so that the main server resources are not consumed by Elasticsearch. However, despite doing this, your Elasticsearch may not be working to its maximum potential due to these reasons:
a. Lengthy Rendering:
Almost every time, Elasticsearch gives you results quickly. But sometimes the product data is not kept in the Elasticsearch server and the Magento has to seek and load from its own database which results in a slower search.
E.g. we want to display the following information in search results: product name, core characteristics, a link with an image. This whole set of data is present in the Elasticsearch server except the products’ photos which are saved in Magento. To render these product photos, Elasticsearch will take more time but if you transfer them to the Magento 2 Elasticsearh server, it will require fewer queries to Magento and accelerate the data output. Generally, price and other dynamic data are stored in Magento, thus if it is part of your Magento search results, then you must keep this in the Elasticsearch server.
b. Incorrect Queries:
Repeated and excessive searches are common causes of performance problems. Rather than requesting the necessary data all at once, there may be several similar requests. It’s a typical programming error that calls for optimization of the code.
c. Data Display Problems:
Developers can decide the way of data output and sometimes they do it in a non-optimal way. For instance, instead of displaying 10 products at once and then loading the next portion on users’ requests, they may display 100 products at once.
Although it is up to the Elasticsearch client to decide the number of products to display, if a realizes that they can’t display a huge number of products at once then it is wiser to take a safer route. Display only the required products and load only when users scroll.
d. Server Choice:
If Elasticsearch is located on the Magento server, then the search functionality will consume extra resources which degrade the site speed. Thus, we always suggest locating Elasticsearch on a different server. Also, Elasticsearch must be located on the same local network as your main server else it will take more time for a server to respond. Elasticsearch is one of the services that Magento hosting providers (Sonassi, Nexcess, and others) provide. Elasticsearch is available on AWS for store owners whose websites are hosted on that platform.
e. Incorrect Instance Type:
This problem occurs only if you have rented a 3rd party service. You have selected a service with particular configurations of CPU, memory, and storage capacity. If you get more traffic eventually on your store, then this initial instance wouldn’t be sufficient.
f. Elastic Search Incorrect Settings:
There can be lags in search if it is configured by inexperienced developers. Online retailers frequently choose to use third-party services that handle all required database adjustments because of this. These include cross-cluster replication, indexing buffer settings, and cluster design (the master server for accepting queries, the server for updating the database, and separate servers for processing and answering queries).
3. Using a Third Party Search Engine:
There are many SaaS-based search tools available in the market. They come with feature-rich smart search output and let you deeply customize the search accuracy, speed, and high scalability. You can also collect search insights from the sessions of users’ visits. Here are a few popular options of this kind:
a. Typesense:
Typesense is a cutting-edge, open-source search engine that respects user privacy and has been painstakingly designed for both efficiency and comfort. It makes use of state-of-the-art search algorithms that capitalize on recent developments in machine learning and hardware capabilities. Want to integrate Typesense Search for Magento?
b. Algolia:
Algolia is a popular Magento search ( Case Study ) that employs machine learning and natural language processing for highly precise results. It has self-learning algorithms that learn from the actions of users and refine search results and suggestions to meet customer expectations. Algolia also supports voice search on all touchpoints like mobile apps, websites, and smart speakers. Whatever the geographical location of the user, it will offer faster search through its distributed search network.
c. Searchspring:
Searchspring is highly focused on giving highly precise and accurate search results through its live indexing and semantic search. It also offers advanced merchandising possibilities. The teams have the flexibility to arrange products for various search queries, e.g., move the bestselling, highly rated, or more marginal products in the search results.
d. Sooqr:
This search focuses on the relevance and speed of the Magento search. It utilizes the different attributes of the products to fetch accurate results, filtering & sorting of products. The company boasts of managing 80% of the error due to user mistakes.
e. Klevu:
Klevu employs machine learning and natural language processing for relevant search results. It also offers an AI-based merchandising strategy and personalized product recommendations.
What is the difference between MySQL, ElasticSearch and 3rd party SaaS search tools?
The Magento store owners who use 3rd party SaaS search engine tools are unaware of what’s under the hood and do not know how the database operates. The store owner gets an API to enter the data and can configure settings for improving search while the SaaS provider takes care of the rest. If you are using a 3rd party search and experiencing slow search, then there can be the following possible reasons for the same:
• Lengthy Rendering:
It may be possible that the deceleration happens at the stage of rendering results on Magento. However, a professional Magento team can easily fix it by code optimisation.
• Slow information retrieval:
Sometimes the SaaS solution you are using delivers results slower than normal. In such a situation, you must report this to the provider so that its support team can fix any underlying issue.
At your end, you can use a profiler. Examine the location of the slowdown, the time it takes the service to return the result, and then process the result in Magento before presenting it to the user. In addition to the built-in Magento profiler, we advise using Newrelic for code execution analysis and Xdebug for code debugging.
Second Step: Improve Relevancy of Search Results
To get relevant search results, we always recommend giving MySQL as a search option in the Magento store and using more agile services particularly designed for finding products. Elasticsearch and 3rd party SaaS services can be configured for better relevance. But MySQL is not reliable for higher relevance:
- MySQL can only give results for exact matches while Elasticsearch can also easily deal with misspelled words.
- MySQL doesn’t support discerning synonyms for search queries.
- It can’t search with attributes into account.
- MySQL isn’t optimized to give results by searching a part of the string. It takes much more time for this than other search engines.
It is because MySQL has been designed to retrieve search along with store data, process queries, and make calculations. It can’t support advanced searches like synonyms, typos, etc. You can’t amend additional features into it and it can’t work like dedicated search services.
Regardless of the type of search engine you use—Elasticsearch, native MySQL, third-party, or hybrid—your team must identify and configure every setting to get more relevant results. Before optimization, you must research the user’s behaviour and collect data in the following areas:
- Popular queries
- Popular categories
- Queries with no results
- Common typos
- Frequently used synonyms and word forms
All this information will give you insights into how to improve Magento search results.
How Relevancy of Search influenced?
Let’s go through the core parameters that influence the search results’ relevancy. The options to use these methods depend on the usage of search:
• Attributes and their weight:
Common attributes such as product name, description, colour, weight, or SKU majorly define the relevancy of search results.
E.g. if we have given high priority to product description, then if a user for “overcoat”, the search engine will first display those products that have this word in their product descriptions instead of product names. This doesn’t guarantee that the search results will be fully accurate.
Thus, it is essential to prioritize the attributes in the correct order. By default, the weight of all attributes is the same, but we recommend giving the highest priority to product names.
• Search Types:
There are three search by MySQL in Magento:
- “Like”
- “Fulltext”
- “Combine”
By default, Elasticsearch supports “Fulltext”. Why? Because “Like” will search each word from a query separately, returning not the exact results as a shopper may expect. E.g. if a customer searches for “olive overcoat”, it may display all olive garments along with all overcoats.
It implies that when a “Fulltext” search is enabled, the whole phrase is searched as a whole and gives results of precise goods. “Combine” will unite the results obtained in the first two ways, again giving irrelevant results.
• Autocomplete Search:
Auto-suggest is a great usability option for buyers, however, it becomes a double-edged sword if configured incorrectly.
E.g. Elasticsearch employs fuzzy search i.e. it changes letters one by one to find the term that a visitor might have meant. It is possible to set the number of letters for substitution. However, with the wrong configuration, this fuzzy search may turn a query into nonsense. MySQL doesn’t even have this functionality.
• Synonyms:
In search, you have to think of every possible word that includes synonyms, possible word forms, and common spelling mistakes. In Elasticsearch, it is possible to create synonyms based on user’s requests analytics in the search engine menu.
• Redirects:
Your investigation may have led you to the most popular searches made by prospects. Provide direct links to these categories or pages so that users may jump straight to the page they want without having to look through the entire results list.
instead of product names. This doesn’t guarantee that the search results will be fully accurate.
Thus, it is essential to prioritize the attributes in the correct order. By default, the weight of all attributes is the same, but we recommend giving the highest priority to product names.
Is there any role for Store Size in Magento Search?
Yes, the search functionality depends a lot on the size and peculiarities of your Magento store. Here is a general suggestion:
1. A Small Store (up to 100 products):
We can assume that in a small store, customers can easily navigate through the products in the store. Predictive search (autocomplete) requirements would be simple, and there is no requirement for Magento advanced search settings. Also, there will not be a huge load in such stores. Therefore, even MySQL search would suffice the search requirements.
2. A Middle-Size Store:
A faster and more relevant search is required if you are offering a huge catalogue in your Magento store. In such stores, we always recommend using Elasticsearch and fine-tuning it to deliver a great shopping experience to your customers.
3. A Large Store:
If you are offering tens of thousands of products in your store, with a plethora of categories and subcategories. Along with this, you have customers all over the world, then these factors demand an advanced search solution in your Magento store.
Suppose you are an online merchant based out of the U.S. i.e. the servers of your Magento store are also in the US. However, you need to deliver a stable, fast, and relevant search feature to all the customers located in Europe, Australia, Asia, and other regions. If you are using Elasticsearch, then you have to lease servers in other continents as well and deal with a distribution network, which is a difficult task.
Here a SaaS solution becomes a better choice as these services usually provide a distributed network. A network of data centres all over the world handles search queries in corresponding regions to cope with network latency.
Third Step: User Experience
Lastly, buyers place about equal value on search usability as they do on speed and relevancy. With some variations for small and large stores as well as for desktop and mobile versions, there is a lot of space for improvement. Thus, you need to delve into how to properly design the search in your store.
Conclusion:
In this article, we have mentioned all the possible ways to improve the search functionality in your Magento store. It is a challenging task, as there can be multiple problems with your existing search. At Ceymox Technologies, the best Magento development company in India, we have expertise in optimizing the Magento store peculiarities, fixing bugs, improving performance, and building an entire Magento store from scratch. Let us know your requirements.
Hubspot SEO Certified | Hubspot SEO II Certified | Google Ads Search Certified | Google Analytics Certified |
Sreehari N Kartha is a skilled Digital Marketing Analyst at Ceymox, certified in SEO. His expertise encompasses a wide range of digital marketing strategies, including managing advertising campaigns on platforms like Google Ads, Facebook Ads, Instagram Ads, WhatsApp Ads, and LinkedIn Ads. With a strong foundation in SEO and SMM, Sreehari is adept at optimizing online visibility, driving engagement, and generating qualified leads and conversions. His passion for emerging technologies, such as Crypto, NFTs, and Web3, further complements his skillset, enabling him to navigate the dynamic digital landscape.
View All Articles