Hello to Amasty blog readers!
Today we are talking about a very important aspect of Magento 2 – the search engine.
In a nutshell, a store always has several tools that users employ to look for the products they want. And the search is the main one! Magento 2 offers a list of features for flexible search tuning so that your customers will be able to find and purchase exactly the products they need. Today, we are dissecting those features.
Streamline Magento 2 search
Help customers find the needed products!
Main Magento 2 Search Facts
- Magento 2 no longer provides the option to set the comparable method for MySQL engine. In Magento 1 administrators could use ‘like’, ‘fulltext’ or ‘combine’ method. Magento 2 comes with a full-text search method that’s not working well for larger stores.
- Magento 2 Open Source allows MySQL as a search engine only. The Commerce edition provides the merchants the option to work with Elasticsearch, MySQL, and Solr.
- You can find the search settings at Configuration > Catalog > Catalog > Search Engine Optimization.
How Magento 2 Search Works
Quick Tip: To have your product on the search results page, its Visibility setting must be “Catalog, Search” or “Search”. Choosing the second variant means that the product won’t be visible on categories.
Search is executed by text attributes, which are configured for Use in Search. The results relevance is counted taking into account the search weight parameter, which is located at Stores > Attributes > Product, as well as the Use in Search setting.
In Magento 2, search autocomplete feature is named Suggested Terms. Thanks to this option, the users are offered the existing and non-empty (with at least one result available) search terms. Thus, Magento 2 changes a search query or finishing it on the fly while a visitor remains satisfied with the shopping process:
The search query which is entered by a user is compared to the known queries. You can see them all at Marketing > Search Terms.
Each of the search terms can be configured by a Magento 2 store admin.
Here, you can turn the term on only for the selected stores, remove it from the magento 2 search autocomplete display, and create a custom URL to replace the standard one.
Popular Search Terms is a page that shows the users’ queries (up to 100). The more the users looked for products using the term, the more weight it has. You can turn this option on or off at Stores? Configuration ? Catalog ? Catalog ? Search Engine Optimization ? Popular Search Terms.
Advanced Search is a nice feature which lets you search by attributes separately.
If you want an attribute to be used in advanced search, turn the Visible in Advanced Search option on:
Magento 2 Commerce Search Features
Magento 2 Commerce has additional search features available out of the box.
You can set up synonyms to make sure that the customers will get the valid results even if they’re using a slightly different query which is still very close by its meaning. To enable the custom search in your Magento 2, adjust the synonyms in the admin panel:
And here’s the result. We searched for a shirt, but other similar items appeared in the search results according to our settings:
Commerce Edition supports Solr and Elasticsearch out-of-the-box, while Magento 2 Open Source provides the ability to enhance the default search capabilities with the aid of third-party custom search.
According to Magento, Elasticsearch is an open-source product that enables you to take data from any source, any format, and search and visualize it in real time.
- Elasticsearch performs quick and advanced searches on products in the product catalog;
- Elasticsearch analyzers support multiple languages;
- Elasticsearch supports stop words and synonyms;
- Indexing does not impact customers until reindex is completed.
Pick your Magento 2 search tool