Table of Content

How to Improve Magento Search Results (Updated for 2024)


According to numerous studies, potential customers who use your on-site search bring higher conversion rates. Well, that's reasonable: these people know what they want and have a strong intent to buy. The rest perform a search just in case and might not have exact plans. Anyway, the outcomes largely depend on the search results. Will they be relevant and delivered quickly?

A search process on Magento stores may be exhausting. For example, an in-built MySQL search can show tons of irrelevant items, find nothing because of typos, or can't search by attribute weights. That's why you might see the following picture: the traffic is excellent, while the conversion rate is lower than expected. To change this, you have to look into and eliminate Magento search issues.

For comprehensive recommendations, explore our , which offers a wealth of strategies to effectively boost your CR effectively.

The Magento search optimization path will depend on the search solution used in the store. You might have a native search with MySQL, Elasticsearch, or a third-party search extension. In this blog post, we'll share how to make searching for products on Magento 2 easier and improve Magento search results in all these cases. Additionally, we will draw on examples from some of the to illustrate effective practices.

User-friendly On-Site Search Bar: Important Stats

Consulting companies and B2B services constantly study the role on-site search plays for online retailers. Take a look at some data:

  • 43% of online store visitors use the search function right from the start (Forrester, , 2022).
  • Users utilizing store search are 2.4 times more likely to place an order. More to say, people who use the search on online stores spend 2.6 times more than those who don't (, 2019).
  • Big names in online retail report a substantial rise in their conversion rates when consumers search on-site. Walmart's CR goes to 2.9%, which is 2.4 times more than for sessions without the search. Amazon noticed a striking 6x soar, from 2% to 12% (, 2021).
  • A poor search experience scares away potential customers. Up to 80% of shoppers leave eCommerce websites because of irrelevant search results, tangled navigation, and insufficient product information (, 2023).

These figures underline the significance of the search function both for customers and the well-being of your business. After all, you want an easy-to-use, fast, and convenient store that converts, is SEO-optimized, and answers to the standards.

Now, let's dive into the strategies and tactics that help improve Magento 2 search results.

Step 1: Accelerating Magento Search

Suppose you've already set up the catalog search and now experience issues with its speed. Then, you need to take steps to enhance it, as having a fast-loading Magento website is one of the conditions of good user experience and conversion rates. How can you improve search speed? The possible measures depend on the type of search enabled in your store. There are three primary cases, and we'll examine them all.

1. If You Have a MySQL Search

Magento Search Engine with MySQL

Up to version 2.4, Magento regards MySQL as a default search option. And many actually use it. MySQL is a database that stores all the platform's data and processes (not only search but also other queries like displaying a catalog and product pages).

When a store is relatively small or not heavily loaded (e.g., one visitor in 5 minutes), this native functionality might be enough. Otherwise, some problems with the search speed are likely to occur. There can be several issues behind slow Magento search with MySQL.

a) The code is written with substantial mistakes

For instance, every time a customer searches on the store, Magento performs some unnecessary operations, e.g., extra table joins. The data in them is irrelevant to the search, but it takes time to analyze it. As a result, each request may run a couple of seconds slower.

To resolve this issue, developers need to revise and optimize the code. A profiler will help to find chunks of code that take longer to execute. And don't forget that database optimization helps a lot to  on the whole.

b) The database is overloaded with queries

If hundreds of people (or more) are simultaneously on an online store, MySQL is likely to be overwhelmed. This can even lead to the website's general slowdown.

In this situation, the best way out is to unload MySQL by passing the search feature to another service (and server). There can be many options, but the most popular is the Elasticsearch engine, which we'll talk about next. Older can be integrated with the Elasticsearch core via extensions.

2.  If You Have Elasticsearch

Elasticsearch for Magento

Starting from version 2.4, Elasticserach replaced MySQL and became a default search option for Magento. Why was this done? Firstly, Elasticsearch is geared for Magento search: it's faster than MySQL and more flexible in tweaking terms.

Secondly, this measure frees Magento itself from handling additional search features. Basically, such queries are regarded as heavy due to the numerous criteria they have to meet. Adobe detached the search logic to offload MySQL and optimize the overall . Besides this, developers usually install Elasticsearch on a separate server so that the search doesn't consume the resources of the main one. But even so, your store equipped with Elasticsearch isn't immune to problems with search speed. Here are some of them.

a) Lengthy rendering

As a rule, Elasticsearch returns the needed response quickly. But sometimes, not all product data is kept in the Elasticsearch server, and for displaying results, Magento has to seek and load it from its own databases. This makes Magento Elasticsearch slow, requiring users to wait longer.

For instance, we need to showcase the following info in search results: product names, core characteristics, a link, and an image. All this data is fetched from the Elasticsearch server, except for photos saved in Magento. If you transfer them into Magento 2 Elasticsearch, you'll reduce the number of queries to Magento and accelerate the data output. By the way, check out our guide on how to make media files load even quicker.

Prices and other dynamic data are traditionally stored in Magento. But you can keep all static data in Elasticsearch and generate search results based mostly on it.

b) Incorrect queries

Excessive and repetitive queries are quite widespread performance issues. There can be multiple identical requests instead of asking for the needed data once. It's a common programming mistake that requires code optimization.

c) Problems with data display

Developers can set the data output differently and sometimes do it in a non-optimal way. For example, instead of displaying the first 10 products and then loading the next portion, they try to show hundreds at once.

It's up to the Elasticsearch client to choose the quantity of results to show. But if a developer realizes they can't display this number quickly enough, it's better to take the safe route: show fewer items and load new ones as shoppers scroll. There are many more unique cases of this kind that developers must find for general and to improve Magento search in particular.

d) The choice of the server

If Elasticsearch is on the same server as Magento itself, the search functionality consumes its resources, negatively affecting the site's speed. To avoid it, we'd recommend you allocate a separate Elasticsearch server.

Most importantly, Elasticsearch must be in the same local network as your main server. Otherwise, waiting for a server response may take extra time. Eventually, customers won't see the benefits of hosting search outside the main store.

Magento hostings (Sonassi, Nexcess, and others) offer Elasticsearch as one of the services. Store owners who run their websites on AWS can use its version of Elasticsearch.

Due to amendments in the Elasticsearch licensing, AWS has recently introduced the OpenSearch project, a fork of open-source Elasticsearch. Currently, AWS is supporting versions of the original Elasticsearch as well. Anyway, we think the changes won't affect Magento websites.

e) Incorrect instance type

This problem can occur if you're renting a third-party service. You've chosen a solution with particular configurations of CPU, memory, and storage capacity. If the store becomes more popular, the initial instance won't be sufficient.

f) Incorrect settings of Elasticsearch

If configured by your developers, Elastic can operate with lags. That's why online stores often opt for third-party services that take care of all the necessary database tweaks. These are cluster setup (the master server for taking queries, the server for updating the database, separate servers for processing and responding to queries), cross-cluster replication, indexing buffer settings, and more.

3. If You Have a Third-Party Search Engine

Algolia SaaS-based search tool

There are many SaaS-based search tools on the market. As a rule, they feature some kind of smart search output, offer the ability to deeply customize the accuracy of search, focus on speed and high scalability, as well as collect search insights from user sessions. Let's briefly talk about a few options of this kind.

a) Algolia

This provider uses machine learning and natural language processing to reach higher precision of results. Its algorithms learn from users' actions to refine each subsequent search session and live up to customers' expectations. Also, supports voice search for mobile apps, websites, and smart speakers. It promises high-speed search, no matter where it happens geographically, thanks to a distributed search network.

b) Searchspring

The company is primarily focused on delivering accurate search results thanks to live indexing and semantic search. also offers advanced merchandising possibilities. Store teams can make arrangements for various search queries, e.g., move the bestselling, highly rated, or more marginal products to the top of the search results.

c) Sooqr

This solution is compatible with Magento and aims to improve Magento search relevance and speed. states to leverage attributes for fetching accurate results, filtering, and sorting. The company says its error tolerance is able to cope with up to 80% of users' mistakes.

d) Klevu

The provider utilizes machine learning and natural language processing for the sake of relevant search results. Besides this, offers an AI-based merchandising strategy and personalized product recommendations.

Third-party SaaS Search Tools vs. MySQL and Self-hosted Elasticsearch: What's the Difference?

Those store owners who use third-party SaaS search tools can't see what's under the hood and change how the database operates. A customer gets an API to enter data and is able to configure settings for improving search relevance while the provider takes care of the rest. If your online store is equipped with a third-party service and experiences speed-related problems with search, there could be a couple of reasons for this:

a) Lengthy rendering

Probably, deceleration occurs at the stage of rendering results on Magento. As we said before, your team can fix it by code optimization.

b) Slow information retrieval

Sometimes the service you use returns results slower than usual. In this case, the only thing you can do is report this provider so that its support team finds and resolves the problem.

Anyway, the very first step is to use a profiler. Check where the slowdown starts, how long it takes to get the result from the service, and then process the result in Magento before displaying it to a user. We'd recommend having not only an in-built Magento profiler but also Xdebug for debugging the code and Newrelic for the code execution analysis.

Step 2: Enhancing Magento 2 Search Relevance to Search Queries

To get relevant results, we strongly recommend every Magento store owner to give up MySQL as a search option in favor of more agile services designed specifically for finding products. Elasticsearch and SaaS products can be thoroughly configured to improve Magento search relevance.

In turn, the in-built MySQL search isn't so adaptable:

  • MySQL can deal only with exact matches (alternatively, even the out-of-the-box Elasticsearch is able to search by misspelled words).
  • search doesn't support features like discerning synonyms for search queries.
  • MySQL can't search, taking attribute weights into account.
  • MySQL is poorly optimized to search a part of a string inside the whole line; it will do this far longer than other search engines.

Why is that so? MySQL is designed to retrieve search data as well as store data, process queries, and make calculations. But it's unable to support more advanced search: by synonyms, words with typos, etc. It will be difficult to apply additional features to it, and there is a big chance this functionality won't reach the level of specialized services.

Anyway, whether you have a native MySQL search, Elasticsearch, a third-party search engine, or a hybrid solution, it's your team's task to determine and set all possible parameters for more relevant results. Prior to the start of optimization, it's vital to research users' behavior and collect data in the following areas:

  • Popular queries;
  • Popular categories;
  • Queries with no results;
  • Typical typos;
  • Frequently used synonyms and word forms.

This valuable information will give you insights into how to improve Magento search results and show products as accurately as possible.

What Influences the Relevance of the Search?

Now let's consider core parameters that influence the relevance of the search. Note that possible options and ways to apply them may vary depending on the used solution.

1. Attributes and Their Weight

Attributes (like a product name, description, color, weight, or SKU) largely define the relevance of search results.

For instance, we've prioritized a description over a name. When a visitor types “trenchcoat”, a search engine will first showcase products with this word in descriptions, not in product names. Will the results be accurate enough? Not as much as we would like them to be.

That's why it's essential to prioritize attributes correctly (in the standard settings, the weight of all attributes will be the same). We advise you to give the highest priority to product names.

Attributes in Magento search

2. Search Types

MySQL (in Magento 1) offers three search types:

  • “Like”;
  • “Fulltext”;
  • “Combine”.

Elasticsearch supports “Fulltext” by default. Why? Because “Like” will search each word from a query separately, returning not as exact results as a shopper would expect. For instance, for “beige trenchcoat”, it might display all beige items as well as all trenchcoats.

In the meantime, when the “Fulltext” mode is enabled, the search focuses on the whole phrase and retrieves far more precise goods. “Combine” will unite the results obtained in the first two ways, again leading to irrelevant search results.

3. Autocomplete Search

As a concept, autosuggest is an extremely wholesome option for shoppers. In practice, this feature could be a double-edged sword if configured incorrectly.

For example, Elasticsearch has a so-called fuzzy search. It changes letters one by one to find the term that a visitor might have meant. You can set the number of letters to which this substitution applies. With a wrong configuration, the fuzzy search might turn a query into nonsense. In turn, MySQL doesn't even have such functionality.

Search autocomplete on Bright Star Kids

4. Synonyms of All Kinds

You have to foresee everything: synonyms, possible word forms, and common spelling mistakes.

When it comes to Elasticsearch, you can create synonym sets based on the users' requests analytics in the search engine menu.

5. Redirects

The analysis that you've done could prompt you what prospects seek most commonly. Add direct links to these categories or pages so that people land on the desired page straight away without browsing through the whole list of results.

Does Size Matter When You Want to Improve Magento Search?

The search option to choose hugely depends on the size and peculiarities of your online store as well as business tasks. The general advice would be the following:

a) A small store (up to 100 products)

Presumably, the quantity of categories and goods allows users to navigate relatively easily across your online store. Predictive search (autocomplete) requirements might be simple, and there's no need for Magento advanced search settings. Besides this, such a store doesn't experience high loads. In this case, an in-built MySQL search can be adequate for the number and complexity of searches.

b) A middle-size store

The blazing-fast speed and impeccable relevance of search results are essential since you have manifold positions in the catalog. We'd recommend running Elasticsearch and fine-tuning it to keep the shopping experience of your regular and new customers great.

c) A large store

You have tens of thousands of commodities, plenty of categories, and subcategories. Besides this, you can be present in markets around the globe. These factors raise the need for a Magento 2 advanced search solution.

Let's say your eCommerce website is placed on the servers in the US. But you need to ensure an equally fast and stable search not only for American customers but also for European, Arabic, and Asian.

If you enable Elasticsearch, you'll need to lease servers in different places and deal with distribution, which is a tough task.

So, in this case, a SaaS solution is the best choice since these services usually provide distributed search. A network of data centers all over the world handles search queries in corresponding regions to cope with network latency.

For instance, one of our clients (25.000 items; several languages, including French, German, and Spanish) opted for Algolia. This provider has a distributed search network of more than 70 data centers in 17 regions. Of course, it comes at a price affordable for enterprise-level businesses rather than smaller stores.

In any scenario, we'd recommend conducting A/B tests to find out what is better for your store's UX and conversions: Elasticsearch or a third-party solution. And only if a SaaS search engine turns out to be more profitable and adaptable to customers' needs, it's reasonable to pay for it.

Step 3: Working on User Experience

Finally, search usability is almost as important to purchasers as its speed and relevance. There is much room for improvement, with some differences for small and large stores as well as for desktop and mobile versions.
We've explored the in a separate helpful blog article. There, you can find useful insights and answers to common design questions. What will you choose: a search bar or an icon? What is a pop-up search screen? How should you organize fast search results conveniently for shoppers? Is it worth showing the search history or not? We've covered all the big and small UX/UI aspects, defining a flawless search experience for Magento 2.

Improve Magento 2 Search: To Conclude

We've outlined many ways to refine the site search experience for Magento 2. It's quite a challenging task, true. Every single store has its peculiarities and goals that require different software solutions and optimization strategies. But the major aim for every Magento store owner is improving search so that it becomes faster, handier, and shows exactly what people want to purchase.

It's a great deal of work needed to boost sales, engagement, and the likelihood of repeat purchases. Browse the site search options and Magento search extensions in our blog post, test Elasticsearch, connect SaaS software, and follow the UI/UX best practices for the search results page. By incorporating our tips, you can increase the number of clicks to product pages, promote crucial goods, and improve your Magento site.

The Onilab team is ready to help with this and other types of . Contact us, and we'll evaluate the scope of the work required to make sure your store ranks well on search engines, increase loyalty, and improve search results.

Related Articles

Magento 2 Mobile Speed Optimization: A 2024-ready Guide
Alex Husar
Alex Husar, Onilab CTO

Magento 2 Mobile Speed Optimization: A 2024-ready Guide

14 min
Aug 22, 2023
Magento Optimization for Google PageSpeed Insights (Updated 2024)
Dmitry Gayduk
Dmitry Gayduk, Magento Team Lead

Magento Optimization for Google PageSpeed Insights (Updated 2024)

15 min
Jul 14, 2023
Magento 2 Speed Optimization: 32 Effective Fixes (Updated 2024)
Alex Husar
Alex Husar, Onilab CTO

Magento 2 Speed Optimization: 32 Effective Fixes (Updated 2024)

21 min
Jul 6, 2023

Improve Magento Search Results: FAQ

How Does Magento Search Work?

Search in Magento relies on product attributes (product name, color, SKU, etc.) and can be implemented via various engines: MySQL, Elasticsearch, or third-party advanced functionality. The system converts the store's data into an understandable format, the process known as indexing. After the information is indexed, the engine returns the result that it considers relevant to the user request.

By default, the product search engine rankings are based on its relevance to search queries. But you can adjust, for example, an attribute weight in settings, making certain products more prominent in search results.

Magento 2 offers numerous site search extensions to take the native search to the next level. Some enhancements include better search performance, search suggestions, the ability to search by synonyms, etc.

What Is the Best Solution for Magento Search?

It depends on your requirements and the business size. From Sphinx Search to Algolia, from Elasticsearch to Klevu, you can connect various advanced search options to your store. Each Magento extension has its strengths and weaknesses. For example, Elasticsearch can efficiently manage large catalogs of products. Algolia, in turn, supports Magento instant search and provides a powerful analytics engine.

What's important for Magento websites is to ensure fast loading speed, understand typos, and return relevant results. So, whether it's correct spelling or there are some mistakes, users should be able to discover the desired items quickly and efficiently.

How Do I Improve Search Results in Magento?

First of all, if you have a MySQL search, it's time to switch to a more advanced Magento site search solution. You can start with a Magento Elasticsearch demo and explore how Elasticsearch works in Magento 2. Or you can purchase a third-party Magento site search extension for more capabilities like Magento 2 instant search.

Go to the Magento admin panel to configure search attributes and specify their weight. Manage stop words and synonyms, optimize product data, implement features like autocomplete and suggestions, and regularly monitor what consumers are looking for to ensure every search term aligns with the needed product.

Let’s stay in touch

Subscribe to our newsletter to receive the latest news and updates.