Hello Magento Fans ?,
How you all doing? Welcome to MageComp Tutorials. Today’s subject is How to Set Magento 2 Search Weight. You can check out our last published blog, How to Add Discount Offer with Minimum Purchase in Magento 2. Without any further stay let’s begin ?
Weight search is a mechanism to set some features preferred in the search results in comparison with other features. The attribute with a higher weight value is shown prior to the attribute with the lower weight value.
Let’s say, for example, the attribute named ‘activity’ has weight 3 and the attribute named ‘color’ has weight 9. A search with the ‘blue’ word will show results from the color attribute with value blue and will not show the results from the activity attribute with value blue. This is because the color attribute retains greater weight compared with the activity attribute.
Steps to Set Magento 2 Search Weight
Step 1: Log in to the Admin Panel
Navigate through Stores > Attributes > Product
Step 2: Select the attribute for which you want to set the search weight.
Step 3: Next, from the ATTRIBUTE INFORMATION tab choose Storefront Properties.
- Select Yes, in Use in Search field for including the attribute in search weight.
- In the Search Weight field, you can choose from number 1 to 10. 1 is the minimum value and 10 is the maximum value. The default value for the Search Weight field is 1 if the admin does not set any number
Step 4: Click on Save Attribute
I hope, everyone is able to Set Magento 2 Search Weight successfully. Besides, you can also use Magento 2 Ajax Search Extension to help the customers of your store to search for the products quickly. If you face any complications drop a comment below. Help your friends by sharing the article with them. See you next time till then Stay Tuned and Stay Happy.