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 “blhttps://www.youtube.com/watch?v=9CSbKw1sqqUack” 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:

1. Login to admin panel
2. Navigate to Stores > Attributes > Product
3. Open the attribute in the edit mode
4. Under Storefront Properties,
- Set yes in “Use in Search” to include the attribute in search queries
- 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.
You can also refer to the video tutorial to Set Magento 2 Search Weight from our Magento 2 video tutorial series:
You can also change the layout of the search result page in Magento 2 as per your requirements for better branding.
Also, share the method with the Magento community via social media.
Thank you.