{"id":1154,"date":"2020-08-02T08:59:37","date_gmt":"2020-08-02T08:59:37","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/08\/02\/set-magento-2-search-weight\/"},"modified":"2025-05-22T12:06:14","modified_gmt":"2025-05-22T06:36:14","slug":"set-magento-2-search-weight","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/set-magento-2-search-weight\/","title":{"rendered":"How to Set Magento 2 Search Weight"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 \u201cblack\u201d, the list of products with a color attribute value of \u201cblhttps:\/\/www.youtube.com\/watch?v=9CSbKw1sqqUack\u201d will appear. The products with the description attribute having \u201cblack\u201d word won\u2019t appear.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is how it works and you can set&nbsp;<em><strong>Magento 2 search weight<\/strong><\/em>&nbsp;in your store with the method as shown below:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Set Magento 2 Search Weight:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/07\/Steps-to-Set-Magento-2-Search-Weight-1024x417.png\" alt=\"Steps to Set Magento 2 Search Weight\" class=\"wp-image-9963\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1. <strong>Login<\/strong>&nbsp;to admin panel<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Navigate to&nbsp;<strong>Stores &gt; Attributes &gt; Product<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Open the&nbsp;<strong>attribute<\/strong>&nbsp;in the edit mode<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Under&nbsp;<strong>Storefront Properties<\/strong>,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>     Set yes in \u201c<strong>Use in Search<\/strong>\u201d to include the attribute in search queries<\/li>\n\n\n\n<li>     Set&nbsp;<strong>Search Weight<\/strong>&nbsp;to a number from 1 to 10. Here, 10 has the highest priority and the default    search weight is 1.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">5. <strong>Save&nbsp;<\/strong>attribute<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also refer to the video tutorial to Set Magento 2 Search Weight from our&nbsp;<a href=\"https:\/\/www.youtube.com\/playlist?list=PLBTOxSAJzwEjM5MilmEqj98Ib80tKBu7r\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 video tutorial<\/a>&nbsp;series:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to Set Magento 2 Search Weight\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/4lBALULG3_o?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can also&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/change-search-result-page-layout-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">change the layout of the search result page in Magento 2<\/a>&nbsp;as per your requirements for better branding.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, share the method with the Magento community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1154","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1154"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1154\/revisions"}],"predecessor-version":[{"id":14763,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1154\/revisions\/14763"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}