Frequently Asked Questions
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.
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 searches 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:
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.
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, SKU, description, 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:
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.
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 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.
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.
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.
Monitoring the search terms 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:
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 Popular Search Terms, log in to the Admin Panel.
As you’ve learnt, you can add new search terms for better catalog navigation.
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.
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.
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.
According to the statistics, you may find helpfull the following question about too many redirects error.