Magento 1.6 Quick Search returns unwanted or unexpected results

This issue is very common since last couple versions. I found this useful article how to resolve it here in version 1.5. and I recommend to read it if you want to understand how quick search works.

Here is my update for version 1.6. Basically same idea with small changes:

  1. Copy: app/code/core/Mage/CatalogSearch/Block/Result.php to: app/code/local/Mage/CatalogSearch/Block/Result.php and uncomment lines 149 and 150:
    Then go to line 172 and change from:
    $this->_productCollection = $this->getListBlock()->getLoadedProductCollection();
    $this->_productCollection = Mage::getSingleton(‘catalogsearch/layer’)->getProductCollection();
  2. Copy: app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php to: app/code/local/Mage/CatalogSearch/Model/Resource/Fulltext.php and go to line 356 and change:
    $likeCond = ‘(‘ . join(‘ OR ‘, $like) . ‘)';
    $likeCond = ‘(‘ . join(‘ AND ‘, $like) . ‘)';
  3. In Admin Panel -> System -> Configuration -> Catalog -> Catalog Search set Search Type property to “Like”. Then reindex data, refresh cache…


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">