How to show the Exact searh result in Magento

If you want to show the exact search reuslt for your products
Two things need to be changed

1) In admin system->configuration->catalog->catlogsearch->Search Type
Make it as Like

2)Just copy the fulltext.php file in local folder as given
app/code/local/Mage/CatalogSearch/Model/Resource/Fulltext.php

and just replace the above code

foreach ($words as $word) {
$like[] = $helper->getCILike(‘s.data_index’, $word, array(‘position’ => ‘any’));
}
if ($like) {
$likeCond = ‘(‘ . join(‘ OR ‘, $like) . ‘)’;
}

BY

foreach ($words as $word) {
$like[] = ‘`s`.`data_index` LIKE :likew’ . $likeI;
$bind[‘:likew’] = ‘%’ . $queryText . ‘%’;
}
if ($like) {
$likeCond = ‘(‘ . join(‘ AND ‘, $like) . ‘)’;
}

and clear the cache and reindex the data from admin

Français : Schema descriptif des communication...
Français : Schema descriptif des communications entre Magento – ERPWebStore – Sage ERP X3 (Photo credit: Wikipedia)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s