My experience has shown me that the default Magento search is really bad, it doesn’t matter if you’re using the Community version or the Enterprise one: search results are always bad, even if you don’t have too many products in your catalogue (less than 200). Here are some tips on how to improve the search:
- First of all, check the search type in your backoffice (System » Configuration » Catalog » Catalog search). By default, Magento uses mysql “LIKE”, you can try combining “LIKE and FULLTEXT”. Don’t use fulltext only, because unless you search for the exact word, you won’t get any results.
- If you’re using Magento Enterprise, you should definitely enable Solr (it’s easier than it could initially seem, but final results are great). I’m writing a quick guide that I haven’t finished. In the meanwhile, take a look at this.
- Another interesting extension I’ve just run into is the «Catalog Search Refinement», it claims to improve the search results. I’ll try it out (it says it’s compatible by default with Magento latest versions).
- You could try with some extensions that claim to improve Magento search. Most of them aren’t free. But the good news is that I have found a specific extension, for free, kind of old, but that actually improves the search results. The name of this extension is «Enhanced Search» and you can grab it from Magento Connect. Even though it says it’s only compatible with Magento 1.1, the truth is that I have tried it with a Magento 1.6 and 1.11, and it works (and I’m pretty sure it will work with 1.7 and 1.12 as well).
It is really annoying that the Magento default search system works so bad. Even getting a collection and filtering it by attributes using some like expression, works much better than the default search. For example:
$productsCollection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToFilter('type_id', array('eq' => 'simple')) ->addAttributeToFilter('status', array('eq' => '1')) ->addAttributeToFilter( array( array('attribute'=>'name', 'like'=>'%'.$search.'%'), array('attribute'=>'sku', 'like'=>'%'.$search.'%') ) );
How can this be possible? Is it the Magento indexing system? MySQL? The number of products? In any case, Magento should improve this super-bug, because it makes no sense.