0
votes

My magento store is having trouble showing relevant results when it comes to the search. A perfect example is:

http://supercb.com/catalogsearch/result/?q=cobra+ltd

As you can see further down the page there are several products that have "cobra ltd" in the name however they are not at the top of the results. I have the search set to fulltext and only the name attribute is searchable. The minimum search query is set at 2, although the mysql configuration (ft_min_word_length) is at 3. Also in the mage core I changed the like condition to

$likeCond = '(' . join(' AND ', $like) . ')';

I've cleared the cache and database results and still am having no luck. Does anyone have any ideas why my search isn't working properly? And since a lot of my products have 2 letter parts to the names will I have to change the mysql config? (Not sure if that is possible on hostgator)

1

1 Answers

0
votes

Because database LIKE searches are the absolute worst form of search on the planet.

They return the found items in the order they were found in the database, not by match relevance. Magento doesn't even begin to address the issue in Community Edition. And usually the relevant item will be on page three of a six page result collection.

The next worst form of search is MySQL Fulltext, you must play around with settings in the my.cnf file. While the fulltext search starts to attempt sort relevance, you'll find it isn't even good enough then.

Magento is built on the Zend Framework which includes Lucene search. There are modules out there that turn it on and give you all sorts of functions to give relevant results before you even begin sorting by relevance. The collection tends to be relevant and then sorting by descending relevance starts making the first half the first page look pretty good.

Basically, this is one of the modules you will need to buy and $150-250 worth of module has fairly instantaneous payback. The hate mail you receive from your customers over poor search tends to go away and the orders increase. Don't pinch dollars to save pennies on this one.

Don't waste time like I wasted time trying to make Stock Magento search work. Lots of free modules out there that do diddly as they don't replace the 2-stroke weed-eater engine with a Cat OHC 6 Cylinder diesel.