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:
- Login to admin panel
- Navigate to Stores > Attributes > Product
- Open the attribute in the edit mode
- 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.
- Save attribute
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.
Get Weekly Updates
Never miss Magento tips, tricks, tutorials, and news.
Thank you for subscribing.
Something went wrong.