How to Set Magento 2 Search Weight

How to Set Magento 2 Search Weight 4

Magento 2 attribute search weight allows the admin to assign a weight for product attributes that are enabled for catalog search. Doing so, the attributes with higher priority get preference over other attributes to appear in the search results.

Optimizing the search facility in the online store only allows the visitors to quickly find the required items and speed up the conversion. Also, the enhanced shopping experience is delivered at your Magento 2 store!

In Magento 2, there are 10 levels of search weight from 1 to 10, where 1 is the lowest weight and 10 is the highest weight. Attributes with higher priority are responded first than the ones with lower.

For example, the Magento 2 store has an attribute color with weight 7 and description with weight 3. Now, if a visitor searches for the term “black”, the list of products with a color attribute value of “black” will appear. The products with the description attribute having “black” word won’t appear.

This is how it works and you can set Magento 2 search weight in your store with the method as shown below:

Steps to Set Magento 2 Search Weight:

Steps to Set Magento 2 Search Weight

  1. Login to admin panel
  2. Navigate to Stores > Attributes > Product
  3. Open the attribute in the edit mode
  4. Under Storefront Properties,
    1. Set yes in “Use in Search” to include the attribute in search queries
    2. Set Search Weight to a number from 1 to 10. Here, 10 has the highest priority and the default search weight is 1.
  5. Save attribute

That’s it.

Any doubts about the Magento 2 Weighted Search? If so, do mention them in the Comments section below. I’d be glad to help you out.

Also, share the method with the Magento community via social media.

Thank you.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 12 Reviews)

Marketing Manager at Meetanshi, she is an expert in the field with 6 years of experience. Apart from work, she is a foodie, watch lover and a proud wife.

Leave a reply:

Your email address will not be published.