A Quick Explanation of Weighted Search in Magento 2

Posted by

Search is an effective tool in looking for products and makes people be more likely to make a purchase in the store. In this article, we will give you an explanation of weighted search in Magento 2.

What is Weighted Search?

Regarding the catalog search, product attributes set up for catalog search can be allocated a weight to give them a higher value in search results. It can be seen that there are ten levels for search weights in backend page, from 1 of the lowest weight to 10 of the highest weight. Attributes which have a greater weight are responded first and then followed by attributes with a lower weight. For instance, suppose that the system has two attributes, “color” with a search weight of 4 and “description” with a search weight of 1. When you make a search with the word “blue”, search results will give you a list of products with a color attribute value of blue instead of descriptions including the word “blue”. Hence, it is clear that the color attribute has a greater weight than the description attribute in this example.

weighted-search-magento2

Customize the Search Weight Properties of an Attribute

To set up search weight properties of an attribute, you can follow this instruction:

  1. Choose Stores on the Admin Sidebar -> Select Product under Attributes section
  2. Look for the attribute you want in the list -> Open in edit mode
  3. Tap Storefront Properties in the left panel and then do the following:
  • Apply Yes to Use in Search to contain the attribute in search queries
  • Choose a number from 1 to 10 for Search Weight part, where 10 is the highest search value of the attribute. In case no value is added, all attributes have a search weight of 1
  1. Click on Save Attribute button to complete

Conclusion

We have shown you the detailed information about weighted search in Magento 2. If you need any help, please feel free to contact us.

Leave a Reply

Your email address will not be published. Required fields are marked *