dannymcc

a genius in training.

1 note

Magento Search Accuracy

Improving your stores search accuracy

Recently we have been working with Magento a lot. The accuracy [or lack of] of the search has come up in conversation with our clients quite a lot.

When you use the built in search feature in Magento the search results aren’t ordered by relevance. There is a simple way of fixing this.

Within your template, find the following file /catalogsearch/form.mini.phtml.Open up that file and find the following line:

<form id="search_mini_form" ... >

Underneath the above line add the following code:

<input type="hidden" name="order" value="relevance"> <input type="hidden" name="dir" value="desc">

This orders the results by relevance and then by description.

You should also change the search type to like rather than fulltext. This setting can be found in the Administration panel.

Hope this helps someone as much as it helped us!

  1. dannymcc posted this