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.
- Navigate to: /app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php
- Go to line 331 and find $likeCond = ‘(‘ . join(‘ OR ‘, $like) . ‘)’;
- Change the OR to AND
*Tested on version CE 1.7.0.2
Leave a Reply
Want to join the discussion?Feel free to contribute!