magento

Magento product search using a search term of less than 4 characters returns no results

With a default magento installation often searches terms for 3 character (or less) will return no results. This is how to fix it. In the Magento Admin interface:

System > Configuration > Catalog, then Catalog Search

The Minimal Query Length sets the minimum number of characters that can be submitted in a query. First make sure this is set to a value you want, in most cases 3 is a sane solution, maybe 2 if you have products with 2 letter names or codes. This is not the only setting which controls the Magento search. The most common cause of this issue is mySQL full text word length variable ft_min_word_len. By default this value is 4, resulting in 3 character words not being index and thus not being displayed in results. To change the full text word length variable to 3 add this to your my.cnf:

ft_min_word_len=3

Restart mysql

# service mysqld restart

Finally reindex the magento catalog, you can do this via GUI or command line.

$ php magento/shell/indexer.php reindexall

After the reindex completes you should be able to search your magento store succesfully with 3 character search terms.

Subscribe to RSS - magento