Hello to Amasty blog readers!

Today we are talking about a very important aspect of Magento 2 – the search.

In a nutshell, a store always has several tools that users employ to look for the products they want. And 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.

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 full-text method.
  • Magento 2 Open Source allows to use only MySQL as search engine. Magento 2 Commerce provides the merchants the option to work with MySQL, ElasticSearch 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.

product search visibility

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 situated at Stores → Attributes → Product, as well as the Use in Search setting.

Magento 2 search relevancy

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.

suggested search terms in magento

The search query which is entered by a user is compared to the known queries. You can see them all at Marketing → Search Terms.

Marketing → Search Terms.

Each of the search terms can be configured by the Magento 2 store admin.

configure search terms

Here, you can turn the term on only for the selected stores, remove it from the 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.

popular search terms in magento 2

Advanced Search is a nice feature which lets you search by attributes separately.

advanced search in magento 2

If you want an attribute to be used in advanced search, turn the Visible in Advanced Search option on:

visible in advanced search

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. You can adjust the synonyms in the admin panel:

magento 2 commerce synonyms

And here’s the result. We searched for a shirt, but other similar items appeared in the search results according to our settings:

how magento 2 synonyms work

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 extensions.

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
  • Supports stop words and synonyms
  • Indexing does not impact customers until reindex is completed

Magento offers a full guide on configuring Elasticsearch for your store. Also, from Magento 2.2.3, the platform supports the fresher versions of Elasticsearch, starting from 5.x.

STREAMLINE MAGENTO 2 SEARCH PROCESS

Help customers to instantly find necessary products with an informative quick search window. Customize autocomplete popup display according to users’ needs and make product search process as easy as it can be.