Read this blog on Magento 2 custom catalog search for more information.
In this post, I will introduce how to configure Search or Catalog search in Magento 2. Setting the minimum and the maximum number of characters that can be submitted in a query is an important part when you adjust the Catalog Search configuration. For example, you can choose the minimum number 1 and the maximum number 148.
How to configure Magento 2 catalog search
To configure catalog search in Magento 2, follow the steps below:
- On the Admin panel, click
Stores
. In theSettings
section, selectConfiguration
. - Select
Catalog
underCatalog
in the panel on the left - Open the
Catalog Search
section, and continue with the following:- In the
Minimal Query Length
field, enter the number to set minimum characters that can be submitted in a query - In the
Maximum Query Length
field, enter the number to set maximum characters that can be submitted in a query
- In the
- To limit the length and word count of search query text, do the following:
- Set Minimal Query Length to the minimum number of characters that can be submitted in a query.
- Set Maximum Query Length to the maximum number of characters that can be submitted in a query.
- When complete, click
Save Config
Magento 2 catalog search alternative
Alternatively, you can use a plugin to do the same. On Magento 2, all that you need to do is install the ExpertRec site search extension from the marketplace. This will automatically replace your default search and add a search bar that has facets inbuilt. You can do further customization in the Expertrec Dashboard that comes along with the plugin.