How to improve Magento v1.7 search results

If you are using the standard built in search function in Magento you may notice that you are getting a large amount of responses to any search.

The way the default search works is like this…

If you search for “Red Jumper”, you will get results for every product with either “Red” or “Jumper” in their product details, which will not necessarily be very helpful.

The way around this is to edit a single word in your code to make it search for products with every word you are searching for, as opposed to any word.

  1. Navigate to: /app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php
  2. Go to line 331 and find $likeCond = ‘(‘ . join(‘ OR ‘, $like) . ‘)’;
  3. Change the OR to AND

 

*Tested on version CE 1.7.0.2

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.