On November 28, 2018, Magento released their fresh upgrade, Magento 2.3. Among other valuable updates, the release brought Magento store owners a  possibility to use Elasticsearch in Magento 2 Open Source. Up until then, the feature was only available in Magento Commerce.

Let’s look into the matter.

What is Elasticsearch and why it matters?

Elasticsearch is an open-source search and analytics engine based on Apache Lucene. Born in 2010 and written in Java, Elasticsearch has been evolving to become a popular search engine and a viable alternative to MySQL for in-store search in e-commerce.

How so?

It’s significantly faster. Besides, Elasticsearch can dig through massive piles of structured and unstructured data and yield relevant results, the thing that often goes beyond MySQL capabilities. Obviously, “relevant search results” make a critical point for an e-store owner, as the better the search results, the more possible a purchase.

So Magento team integrated this rich ElasticSearch functionality into Magento Commerce and then added it to Magento Open Source. What does it have to offer?

Elasticsearch in Magento 2.3: details

Elasticsearch integration with Magento 2.3 allows using certain features of the engine. This makes search and filtering faster, and the richer in products the shop is, the more noticeable the speedup.

Besides, the integration also provides a set of benefits, namely:

  • Support for stopwords and synonyms. Stopwords, most common words in a language (e.g. a, the, to, etc.)  are carefully filtered for the sake of swift performance. Meanwhile, synonyms help yield more relevant results to a customer and hence, improve the shopping experience;
  • Indexing does not impact customers until reindex is completed;
  • Seamless work out of the box, not many additional efforts needed;
  • Elasticsearch performs a quick and advanced search on products in the catalog.

To consider Magento 2 Elasticsearch setup in detail, please check the user guide.

Elasticseach is already available to Magento Open Source users. So why bother to improve it? Our expert Victor Kravtsov shares his opinion:

Well, the default Magento Elasticsearch functionality is rather basic, and the use of engine powers is limited. We’ve decided to go further in the Elasticsearch integration, using more features of the engine to enhance the search process in Magento 2 store

Magento 2 Elastic Search by Amasty: enhanced approach

Below I describe the pain points of Magento Elasticsearch and how we addressed them in our extension.

Wildcard management

Wildcards make a most needed feature indeed. Wildcards are term-based queries that allow you to set a specific word pattern where characters preceding or following the target word are marked with *. In Magento 2.3, you can add wildcards only to the right of a 3+character word.

We expanded this function. In our Elastic Search module, you can choose a wildcard type (*word, *word*, or word*) and the minimal word length:


Managing stopwords

Native Magento 2.3 offers to manage stopwords via CSV. files. However, this may turn troublesome,  as you need to work directly from the server and be very careful. The whole store may go down in case you make some mistake.

Our input. To save merchants some efforts, we introduced pre-installed sets of stopwords in a number of languages:


Note that here we use more languages than Magento 2.3. While Magento Elasticsearch offers 7 language options (if we consider en_gb and en_us as separate languages), our module covers 18 languages.

Besides, in our module, a merchant can edit stopwords directly from the admin panel; no need to work on the server:

Spell correction

As nowadays people often search for goods via mobile devices and on the go, silly spelling mistakes are commonplace. However, they shouldn’t affect the correctness of search results. In Magento  Elasticsearch, this feature is unavailable, but we’ve got this covered. With our Magento 2 Elastic Search enabled, automobiel, shitr,  and other typos will be autocorrected to draw quality results. Here’s how it works on the frontend:


Enhanced category search

In Magento, category search can only deliver up to 10K results. Our module doesn’t have this limitation. “So what? Are 10K results not enough to choose a product?”, you might think. Well, it depends. Of course, a user won’t check even 10K results at once. But if they choose to filter 20K products by price, for example, the limitless search will deliver precise results, while the limited one will sort 10K products at random. This means every second suitable result will be missing, which narrows down the search options.

Separate search settings per attribute

In our module, you can set up wildcard, spell correction and match mode (and/or) for each attribute separately. This feature is not available in Magento Elasticsearch:


This allows providing flexible search settings for virtually any store. For example, you can use the following settings:

PRODUCT NAME – wildcard, no spell correction, match mode – OR.

SKU- no wildcard, no spell correction match mode AND,

DESCRIPTION- no wildcard, spell correction, match mode – AND.

Setting logic: sku search should be precise,  so we exclude wildcard and spell correction. In case of the search by description, we use match mode AND because a description involves a lot of words, and a simple multi-word search won’t provide many relevant results.

Hence, our module provides for extensive search customization depending on the e-store specifics. For example, you can set up a highly detailed search in a store selling car parts, and a less specific search in a confectionary shop. This is not available with Elasticsearch in Magento 2.3.

Elasticsearch 6.x compatibility

Magento 2.3. works with Elasticsearch 2.x and 5.x, whereas our module is compatible with 5.x and  6.x. versions. Elasticsearch 6.x offers more features and gets the fresh security update in no time.

Handling synonyms

Magento Elasticsearch still uses MySQL to manage synonyms, which slows the search down and worsens its relevance.

Our module has a built-in Elasticsearch synonym feature, which helps to take out more accurate synonyms faster. In other respects, our Elastic Search module treats synonyms just like Magento 2.3. You choose them and put them in as a comma-separated list. During Elasticsearch query processing, these synonyms replace one another, which powers better search results:



Power-up for marketing

Apart from the rich search functionality, our module can also help you with marketing tasks. You can enable the rules to boost or lower the relevance of some product according to your marketing goals. Using conditions with product attributes, you can enable returns of promo products in the top of the results.


BIG BONUS: Built-in features of our Magento 2 Advanced Search

Our Elastic Search module is shipped with another powerful search extension – Magento 2 Advanced Search.
What’s in it for you? With this integration, you will:

  • provide your customers with extensive search capabilities not only for searching in products but also in categories, CMS and landing pages, blog posts, brands and more;
  • show recent and popular searches immediately
  • enable search by attribute, rate attributes by priority and manage all use_in_search attributes from the same page. The latter is not available in Magento 2 Elasticsearch, where you need to move from attribute to attribute, which requires more time:


  • get marketing insights. Use Analytics Dashboard to detect popular products and evaluate search efficiency for conversions (available in Advanced Search 1.12.0):


  • ensure positive UX and engaging UI:
    • set up a minimal number of characters for search activation (it’s 3 by default);
    • redirect customers from 404 pages to search results;
    • set up an autocomplete pop-up window to show all search result together with product ratings and the ‘Add to Cart’ button to stimulate one-click purchases:


    • enable tabs to classify search results by location and add them to pop-up and search result pages;
    • set up a user-friendly layout of the pop-up window using ample customization options:


  • move out-of-stock products to the bottom of search results;
  • set up SEO-friendly URLs for search result pages.

The last, but not the least. Our Elastic Search is fully compatible with all Amasty extensions for Magento 2. So to improve search experience further, you can add Magento 2 Layered Navigation, Improved Sorting and Products Parts Finder that help customers streamline search in stores with large catalogs. Besides,  developers can easily enable search through more content types (e.g. WordPress Blog, Simple Press Forum, vBulletin Forum, custom content), adding search based on new entities.

Wrapping it up

Though Magento made Elasticsearch available to Magento Open Source users, the features offered are limited. We’ve come up with a feature-rich – Magento 2 Elastic Search. So is it any better than it’s native counterpart? See for yourself. Our module offers:

  • more Elasticsearch features;
  • flexible Magento 2 Elasticsearch configurations improved customization;
  • attribute search;
  • minimized 0 search result occasions due to long-tail and fallback search;
  • seamless integration with Magento 2 Advanced Search for rich layout and  top search experience;
  • advanced promotion options and analytics.