Elasticsearch and Magento 2: Greatly Improve Search Quality and the Entire Speed of Your Store

Lauren Moore
mirasvit
Published in
5 min readApr 20, 2017

--

A Powerful Selling Tool

As much as we’d like to think our product pages are guiding customers to purchase, it’s actually the search that will help your customers find the products they want. The search in your store is one of the most powerful selling tools. Customers who use your store’s search are more likely to buy because they are shopping with a specific product in mind. Therefore, conversion rate through site search can be up to 50% higher. (source)

It is also important to understand the attention span of your customer. According to Microsoft, the attention span of an average person on a website is about 8 seconds. Scientists say that the longer a customer is on your site, the less likely they will buy something. (source) A customer would never stay in a store if they couldn’t find what they wanted easily.

In the business of ecommerce, providing a search that is correct, fast, and user friendly is more important.

One of the leading and most useful search engines used in ecommerce is Elasticsearch.

Who is Elasticsearch?

The Elastic company was founded in 2012 in Amsterdam with Elasticsearch being their first product. Now, the company has a family of products called Elasticstack, which is used by millions of developers around the world.

Elasticsearch is a search and analytics engine designed for scalability, maximum reliability, and easy management. Everything is indexed, so you can access your information at very high speeds.

Elasticsearch is also opensource and free. So, many companies have taken Elasticsearch and configured it to their specific store’s needs. This means Elasticsearch can be used in many different types of companies. A whole list of companies and how they each use Elasticsearch can be found here.

However, here are some of the best examples:

  • Dell supports large quantities of ecommerce search for over 60 countries in over 21 languages. (source)
  • Facebook, who has used it for over 3 years, searches over 40 tools across multiple clusters with more than 60 million queries a day. (source)
  • The New York Times uses Elasticsearch to provide search for its 164 years of published articles. (source)
  • Elasticsearch is now used in Magento EE 2.1. They used Apache Solr before but have abandoned it.

Using it with Your Magento Store

As a Magento Store owner, you have three options to connect your store with Elasticsearch:

  1. You can buy Magento Enterprise Edition (yearly fee is over 20K) (source)
  2. You can hire developers to create a connector between Elasticsearch and your store
  3. You can use an extension that will connect Elasticsearch to your store

Our Elasticsearch Extension

In order to easily connect Elasticsearch with Magento, we have developed the Elasticsearch Ultimate Extension. This extension will connect Elasticsearch to your store. You are able to use all the features explained above in your Magento store. All you need to do to use our extension is install an Elasticsearch engine on your server (it’s a service like apache or mysql).

The Extension Improves your Magento Search

Compared to the default Magento search, Mirasvit’s Elasticsearch Ultimate Extension can improve your store’s search in the following ways:

  • It speeds up your search results
  • It makes the search more correct

Let’s take a closer look:

Search Results

Using our extension in your store makes your search faster because there is no need to perform slow SQL queries to the Mysql database. Elasticsearch Ultimate does all the search tasks and returns your customer’s results instantly.

The above image shows that as your customer types in the product they are looking for, a menu drops down suggesting possible products that match. Your customer can choose a product from the drop-down menu before they finish typing. As you can see, each product has a description, rating, price, and picture with it. The customer is able to easily view your products while they are searching.

Search Results Are Correct

Mirasvit’s extension improves search by adding search weights for attributes (the value of importance for each attribute), autocorrection, stopwords, synonyms, longtail search, wildcards, and stemming. All these can be specified in the backend interface according to your store’s needs.

For example, suppose that your customer is shopping for a camera. Instead of typing “camera”, they type “kamera”. With our extension, the customer’s query is auto-corrected to “camera”. Your customer will reach the product they want even if they misspell a word.

It Speeds up the Entire Store

Layered Navigation

Our extension improves layered navigation performance of Magento store. Using Elasticsearch it calculates aggregation data for results in the layered navigation block.

Comparison between Elasticsearch and the Default Magento Search. Numbers represent SQL queries of the layered navigation block (lower numbers equal higher page speed)

The default Magento performs much slower when building layered navigation (as you can see in the diagram above). With our extension, the layered navigation performs only a few SQL queries to fetch label names. It does this by building only one query that returns all the values and query times. AND it does it faster for the same product quantity!

It Speeds Up Catalog Pages.

Default Magento returns the list of products by sending the query to mysql. However, Elasticsearch Ultimate returns the list of products related to the current category, separates products into different categories, and speeds up the same layered navigation. So, this means your catalog pages will also be faster while shopping in the store.

Do you want to use Elasticsearch?

Try out Mirasvit’s Extension: Elasticsearch Ultimate Demo now!

Feel free to share your comments and ideas about it! We’ll be happy to discuss them!

Comparison: Sphinx Search Ultimate VS Elastic Search Ultimate

Read more:

--

--