Magento 2 Search Settings and Terms
Magento 2 search functionality has been changed a lot if compare it with Magento 1. Thus, the latest version doesn’t allow Magento 2 owners to configure search methods anymore. They were optimized and included into the default functionality. Besides, Magento 2 has been supplied with full text MySQL search engine. As a result, now you can control product search in Catalog rather than setting up individual methods and configure search terms.
Magento 2 Search Settings
Helpful hint: native Magento 2 search functionality can be taken to a new level with the use of Advanced Search. You will manage to show recent and popular Magento search terms and set up the search in categories, products on CMS pages. Besides, you can adjust the search window to your needs. For instance, show the ‘Add to Cart’ button in the advanced autocomplete window:
#1 Magento 2 search settings (Amasty advice)
Magento 2 search settings will be shown below with the info on how to enable them to work smoothly:
Note: Magento 2.3 open source supports the Elasticsearch engine. Learn more about Magento 2 search settings from our blog post.
#2 Magento 2 advanced search settings
Magento 2 advanced search settings give you an opportunity to set the type of search which allows your users to surf the catalog by a larger set of parameters (product attributes: name, description, Magento get product by SKU etc.) entered into the form:
The search result, in this case, becomes more precise as the engine checks multiple products against numerous matches. The link to the Magento 2 advanced search URL is in the footer of your website:
The fields of the form correspond to the attributes included in your product catalog. Thus, if you need to add a new field into the search form, make the next settings:
- Log in to the Admin Panel and navigate to Stores>Attributes>Product, then choose a needed attribute from the Attribute grid and go to the Storefront Properties;
- Set the Use in Search setting to ‘Yes’:
- Save the changes and clear the cache.
#3 Search Results
The list of search results includes all product variants relevant for characteristics entered in the Quick Search box or the Advanced Search form.
You can display the result list in a form of a product grid or a product list filtered and sorted by a set of attributes. In case the list of products exceeds a one-page size, there appears a pagination control. See how to set the product listing options here.
#4 Weighted Search
The Weighted Search option allows you to give attributes used in Advanced Catalog Search higher or lower value in search results. E.g.: Let’s suppose there are two attributes in the system, ‘color’ with the search weight of 3 and ‘description’ with the search weight of 1. Then a search query with the word ‘green’ will bring to a result list with products containing a color attribute value of green but without products with description that includes the word ‘green’.
To learn how to set up the Magento search weight, see the path and the screenshot of the Magento 2 Advanced Search Settings. You can set a search weight to a number from 1 to 10. 10 has the highest priority here.
#5 Configuring Catalog Search
We have already mentioned Magento 2 uses the full text MySQL search engine. Here we’ll describe how to enable the MySQL engine and limit the size of valid query text.
- If you are still logged in the Admin Panel, navigate to the Stores>Settings>Configuration and choose Catalog option under the left-side drop-down Catalog menu. Expand the Catalog Search section and make the next settings:
Minimal Query Length: fill in the minimum number of characters that can be submitted by a user in a query;
Maximum Query Lenght: fill in the maximum number of characters that can be submitted by a user in a query;
Search Engine: use the default MySQL engine.
- Save the settings and clear the cache.
Magento 2 Search Terms
Monitoring the Magento search keywords applied by users can help you learn the actual product demand and improve current sales rates. If potential customers didn’t find the desired product in the catalog, you can direct them to another product rather than leaving them to hold an empty bag.
Here are several ways you can use the users’ search results to better the sales:
- Use a content page, a category page, a product detail page or page of another website as a landing page for a search term;
- Include synonyms and varieties of terms used by visitors to find one and the same product. E.g.: ‘chair’, ‘armchair’, ‘bench’, ‘recliner’, etc.;
- Find out common misspellings and redirect the queries to a correct product page.
How to Configure Popular Magento Search Terms?
By default, the option is enabled as an engine optimization tool. However, it isn’t connected with the catalog search process. You can better your website ranking, as the Search Terms Page is indexed by search engines.
If you want to configure Magento 2 Popular Search Terms, log in to the Admin Panel.
- Then navigate to the Stores>Settings>Configuration>Catalog>Catalog>Search Engine Optimization:
- Enable the Popular Search Terms, save the settings and clear the cache.
How to Add Search Terms?
As you’ve learnt, you can add new search terms for better catalog navigation.
- If you logged in the Admin Panel, switch to the left sidebar and go to Marketing>SEO & Search>Search Terms then choose to Add New Search Term:
- Complete the next settings:
Search Query: fill in the phrase you want to add as a new term;
Store: choose a desired store view;
Redirect URL: if you want to redirect a user who applied the term for query to another page of the store or to another website, type the URL into the field;
Display in Suggested Terms: set the option to ‘Yes’ if you want the term to be applied as a suggestion if there is no result for a query.
- Save the settings and clear the cache.
If you need to edit a search term, you can make it right on the Search Term grid.
In case you need to delete a search term, set the ‘Action’ to delete in the upper-left corner of the Search Term grid:
Don’t forget to submit the action and clear the cache in the end.
How to Find Search Terms Report?
- Log in to the Admin Panel and choose Reports on the left sidebar. Then navigate to Marketing>Search Terms:
The report will allow you to see the number of results for each term, as well as the number of times the term was applied by users. The data included in the report can be filtered by term, store, results, and hits. Besides, you can export it for further analysis in CSV or Excel XML format.
What are the benefits of Magento search bar for users?
Magento search bar allows you to find the information you need faster. The easier it is for users to navigate around your site, the more likely they are to use your services or products. If users have trouble finding what they're looking for, they'll simply go to a simpler and more accessible website. In addition, if you integrate the search bar with Google Analytics, you can see how often people are searching for a particular product.
According to the statistics, you may find helpfull the following question about too many redirects error.