Search is typically the first place your customers will go to find the products they want to buy from you. When your customer enters search terms to find a particular product, you can customize which properties are searched and how heavily the results are weighted in the search results, ensuring that your customers quickly find the products they need.
See also: Below you'll learn how to include attributes in a search and weight them for accurate search results. If you want more detail on Magento searches, including information on configuring general catalog search options as well as the remainder of specific attribute search options, see the Catalog Search chapter in the Magento User Guide.
- In Magento, click Stores. Under Attributes, click Product.
- On the Product Attributes page that appears, click the attribute that you want to include in the search. If you can't find it, you can filter the list. Type filter criteria in any column heading, and then click Search.
For example, to find all the keyword attributes, type keyword into the Attribute Code column head, and then click Search. The grid filters to only those product attributes that contain the text "keyword." Clear the search by clicking Reset Filter.
- Under Attribute Information, click Storefront Properties.
- To include the attribute in search results, from the Use in Search list, select Yes.
- You can now assign a weight to this attribute to give it a higher value in search results. Attributes with a greater weight are returned before those with a lower weight. For example, suppose there are two attributes in the system:
- color with a search weight of 3
- description with a search weight of 1
A search for the word “red,” returns a list of products with a color attribute value of “red,” but does not return products with descriptions that contain the word “red.”
In this example, the color attribute has a greater weight than the description attribute.
From the Search Weight list, choose a weight from 1 to 10.
Tip: Consider giving attributes such as SKU and Name the highest values to ensure that exact matches are returned in your search.
- You can include this attribute in the Sort By list on the Search page:
- Scroll to the bottom of the Storefront Properties page.
- To include the attribute in your Sort By list, from the Used for Sorting in Product Listing list choose Yes.
- Click Save Config.