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 2.2 Commerce Edition.
Let’s look into the matter.
- What is Elasticsearch and why it matters
- Elasticsearch in Magento 2.3: details
- Magento 2 Elastic Search by Amasty: enhanced approach
- Wrapping it up
Add Elastic Search to your Magento store and provide your customers with relevant search results!
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.
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 at Magento 2 Elasticsearch;
- Seamless work out of the box, not many additional efforts needed;
- You can install it to cloud storage such as Cloudways and to different servers including Ubuntu;
- Elasticsearch performs a quick and advanced search for products in the catalog.
To consider Magento integration of Elasticsearch in detail, please check the user guide.
Elasticseach is already available for 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.
Below we discuss the two solutions in detail and compare them.
Let’s compare Magento 2 Elasticsearch and Amasty Elastic Search. We will describe the pain points of Magento Elasticsearch and how we addressed them in our extension.
Wildcards make the 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 Amasty Elastic Search module, you can choose a wildcard type (*word, *word*, or word*) and the minimal word length:
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 mistakes.
Our input. To save merchants some efforts, we introduced pre-installed sets of stopwords in a number of languages:
Note also 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), Amasty Elastic Search covers 18 languages.
Besides, in our module, a merchant can edit stopwords directly from the admin panel, no need to work on the server:
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 Amasty 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.
Magento 2 settings of search by product attributes allow you only to assign a weight to specific attributes. It gives them a higher value in search results. Say, you can add 3 points to attribute “color” and only 1 point of weight to “description”. Thus, when a customer types “blue” in the search box, first on the results page are products that have the color attribute “blue” and only after them there comes a product that has the word “blue” in the description.
Magento Elasticsearch 6.x compatibility
Magento 2.3. works with Elasticsearch 2.x and 5.x, whereas our Elastic Search for Magento 2.3 is compatible with 5.x and 6.x. versions. Elasticsearch 6.x offers new features and gets fresh security updates in no time.
NEW! Now Magento 2.3.1 supports Elasticsearch 6.x, but it still provides the connection for Elasticsearch 2.x and 5.x. Elasticsearch 6.x is enabled by default because of the end of life of 2x and 5x Elastic versions.
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 Magento 2 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 products 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
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:
(a) set up a minimal number of characters for search activation (it’s 3 by default);
(b) redirect customers from 404 pages to search results;
(c) 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:
(d) enable tabs to classify search results by location and add them to pop-up and search result pages;
(e) 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 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 configurations of Elasticsearch for 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;
- It is available in Magneto 2 enterprise and community editions;
- advanced promotion options and analytics.
Fetch valid results to complex search queries: