Are you looking to set Magento 2 search weight?
Magento search helps customers narrow the product catalog to what they like. A Magento store contains thousands of products. Customers would not want to go through each one to find what they like.
That’s where search engines work. Quickly search the term, and the product associated with that product will come in front.
In this quick tutorial, we will learn to set Magento 2 search weight.
What is Magento 2 Search Weight?
When you type a word into the search inbox, the Magento store scans through the product attributed to finding the matching term. The product attributes include product name, description, color, image caption, and many more.
Now, there are so many products, and each product has, on average, 5+ attributes. Even the most powerful search engine, Elasticsearch, will take time to scan all the attributes. Slow search is a poor website experience.
Magento 2 Search Weight enables the Magento admin to select the attribute and add weight to them for the scanner to look through.
For example: If I enable the color and product title attribute for a search engine and then give the search weight like this:
- Product Color: 10 Weight
- Product Title: 9 Weight
Now the search scanner will look for the ‘keyword’ first in the product color attribute instead of the product title.
Note: At Breeze, we use Elasticsearch to accelerate the search speed.
How to Set Magento 2 Search Weight?
Follow the steps to set Magento 2 search weight:
- Log in to the Magento admin panel
- Navigate to Stores > Attributes > Product
You will find the attribute lists, including color, title, description, and many more
- Open the Attribute you want to set weight for in the edit mode
- Under Storefront Properties
Use in Search: Whether to use this attribute while searching the store for a query.
Search Weight: Assign a numerical value to define search weight – 1 being the lowest weight and 10 being a priority.
- Click on Save Attribute to apply changes.
That’s it. The attribute now plays a role in search engines.
Fast loading ecommerce stores have a high conversion rate. It is recommended to optimize the ecommerce store for performance. For starters, you can take a high-quality Magento hosting with the latest Elasticsearch configuration.
Having multiple product attributes does not mean you should use them all in the search. Select a few important ones, including Color, Title, Description, and Stock.
This way, the website search will work fast and improve the browsing experience.
I hope this article helped you to set Magento 2 search weight. If you encounter any issues, feel free to leave them in the comment box.