What if you show the most relevant search results? Use the guide to improve Magento 2 search usability via new search method by Ajax Search module.

What if you show the most relevant search results? Use the guide to improve Magento 2 search usability via new search method by Ajax Search module.

Learning best practices with Magento 2 search is always a good idea. The positive search experience is generally expected to be easy, quick and appropriate for the search query. But sometimes failing to go as it should.

It happens the search shows the inappropriate results in the autocomplete suggestions dropdown. And the customers are annoyed, or frustrated, and thereby stop progressing towards purchase. We don't think it's what either of us wants.

Here is why we come up with an alternative search method. With the "Most Important Search Keyword" option it shows the most relevant suggestion for each individual search . Start using it to improve search usability in your store.

Improving customer search experience

Just imagine a store with big product catalogs where every product has a multiple selection of accessories. When entering even a minimum amount of characters, users see all the results matching search query.

There are so many choices, but in the same time all them are shown for search results - no matter the product itself or its optional accessories. The default Magento 2 works like this by offering Full text search only.

Of course, we would have preferred better search, right?

Well, our clients are running a successful tools store with a big range of essential accessories. They have asked for the opportunity of reflecting more relevant search results for their consumers. They would like to show up the main tools at the top of results suggestions, and equipment & accessories then.

That is the reason why we included the new alternative search method in our Magento 2 Ajax Search Autocomplete extension since 1.7.0 release. You are able to choose the search type Like instead of Magento 2 default Full text. In fact, you get the smart predictive search method that offers 100% relevant product results. Along with product attribute tricks we will optimize Magento 2 search with more predictive suggest option.

Keep reading to learn how to improve search results. Step by step guide is ready to use.

How do we make Magento 2 search show up exactly what users need?

Taking into account using the new search method by M2 Ajax Search and Autocomplete, the following steps will help to output smoothly the relevant results and the ones users expect to. It matters both for store usability as well as for customer satisfaction.

1/ Go Admin - Stores - Attributes - Product and click Add New Attribute button.

Here we are gonna create an attribute that has the biggest relevance for search. When search word is found in that attribute text then the respective product will be first in search results.

You will be working within “Attribute information” fieldset.

2/ Well, our attribute has “Most Important Search Keyword” name. In addition, you have to select Text field value for Catalog Input Type at Properties tab .

3/ Then at Storefront Properties choose Yes in “Use in search” field and specify 10 in “Search weight” field. Select No in “Visible on Catalog Pages on Storefront”.

4/ The next step is to create the new attribute group. Please go Admin - Stores - - Attributes - Attributes set. In our case, we call the new group “Search Settings”, and assign the new “Most Important Search Keyword” attribute to it.

5/ Now you are gonna work with "Search settings" section. Go Admin - Stores - Attributes section - Product and find the newly created attribute set there. Now you can see the "Most Important Search Keyword" field. We consider the recently created attribute field as the best possible and at the same time most accurate product entity description way.

There may be a question: “How to fill the field correctly?”. So and then we recommend you to specify value - "brand_name tool_type" as you can see on the screenshot above.

Note: don't fill "Most Important Search Keyword" field with too much text. The shorter the value is, the higher the product will appear in search results. Do not add any product id (SKU) or any other unique values. Search algorithm will find them in other fields.

By the way, the display of the search results mostly appropriate to the user's search query will be illustrated by an example of 2 drills - one from brand Fein, and the other from the Festool brand.

6/ The next proposed way is to show one product on a higher priority basis than others. So, we take 2 drills - from Fein brand and from Festool brand. In case you set searching keywords as:

fein drill

festool drill

then the drill from Fein will always be higher than the drill from Festool when the customer enters the word "drill" into a the search bar. And this happens because a string "Fein drill" is shorter (better match) then "Festool drill".

And vice versa: if you want to show Festool before Fein you can change "fein drill" to "fein____ drill" . The "festool drill" better matches then "fein____ drill", so Festool drill will be shown first.

Note: It’s gonna be a bit boring to set search_keyword for products one by one. However, you can do this via mass action in Admin - Catalog - Products. Choose Update Attributes action.

7/ Final step. Run Magento reindex to build new search indexes. We recommend to use the command:

sudo -uapache  php bin/magento indexer:reindex catalogsearch_fulltext

When the command is completed you have new search indexes and most likely better search results.

It's time to maintain the benefits of improved Magento 2 search way and enjoy the relevant suggested products. See how search results for "drill" look now.

4 reasons why M2 Ajax search autocomplete module is the best search solution for Magento 2 sites

And, of course, we'd love to tell a bit more about M2 Ajax Search And Autocomplete. The extension is a must-have if you want to improve Magento 2 search. Have a look at the main advantages:

  • Innovative search method for MySQL Search Engine - “LIKE”. It allows to search for strings with a dash (-), one-two-character substrings and has another algorithm for relevance.
  • The display of the thumbnails for suggested items in a search box
  • The category filter right in the search bar. It helps your customers select the appropriate section in which they want to search for the products.
  • The ability to show CMS Pages and popular search terms in search results.

Not to mention the other numerous settings for search bar design.

In summary

So, what if the default Magento 2 search doesn't match user's queries. And now it's all just...not a problem. You've got the new method, the new way to show instant and relevant results.

Say a few words in comments, please. Maybe you have some other ways.

Popular Magento Themes & Extensions

Leave a Reply