Magento 2 search weight


Magento 2 search weight allows the admin to assign a weight for product attributes and these attributes  to be preferred to appear in search results than other attributes.
Magento 2 Search Weight is very important Storefront Property for display search results in a search list page.

Let me give you one example for understand Magento 2 Search Weight.
We have two attributes.
1. color with a search weight of 5
2. Description with a search weight of 3.
 
When the customer search word "orange" and it will get a list of products with an orange color but does not return products with descriptions that contain the word "orange".
That means, the color attribute has a greater defined weight in admin than the description attribute.
Please check below screenshot for set search weight in Magento 2.
Set Weight Search in Magento 2
Please follow the below.

Steps for set Magento 2 search weight in attribute.


1. Login to Magento 2 admin panel
2. Go to Stores => Attributes => Product
3. Find the attribute  and Open attribute for edit settings.
4. Go to Storefront Properties.
5. Set yes in "Use in Search" dropdown.
6. Set Search Weight to a number from 1 to 10. 10 is the highest priority. The default search weight is 1.
7. Save attribute

That's it. This is very easy steps for set Magento 2 search weight.
I hope this post helps you for better understand and ideas about search weight in Magento 2 .