Optimising for Internal Search

From a usability perspective, incorporating a search function into a website is a good idea.  The current paradigm for finding information online is to visit a search engine – most often Google – and then type in your query before receiving the 10 most relevant websites back as a set of results.

Most ecommerce systems and CMS platforms have a built in search engine that queries the database of content in order to provide access to information.  Such search engines are typically far less advanced than the likes of Google, and in most cases are based on a very simple SQL query along the lines of:

SELECT * FROM data_table
WHERE description
LIKE %$query%

Here, there is a single function in place to determine the order of results that the user will see – there is no real relevance placed upon the result set. A single factor is being used to sort the results whereas Google claim that they consider hundreds of different signals as part of their ranking algorithm.

Why not just use Google?

The truth is that you could just add a Google custom search function to your existing website, and save yourself the effort of worrying about any limitations to your current search system.  It’s not a bad idea – you get the benefit of having a world class search function on your site, and you can rely on the results being as relevant to a user as they are in the main Google Web Search.


Not necessarily.  The fact is that when Google rank a set of results from within your website using their custom search engine, they rank them according to their internal criteria.  This is not necessarily the set of criteria that are most relevant to your users from your perspective.  Let me explain:

You sell two similar products called the iTablet.  One is a 64GB version which retails at £500 and has a wholesale cost of £350, the other is a 32GB version which retails at £450, but has a wholesale cost of £325.  The margin on the more expensive iTablet is £150, whereas on the cheaper version it is £125.  Clearly, you would much rather promote the more expensive version across your site, and one place where you can do this is within your internal search.

It’s all about the rules

The biggest difference between Google and your search function is that you control it, and you can create a set of results that combine user friendly relevant links with commercially sensible choices about pushing users around your website.

Because you have control over the query that is being associated with the search, you can apply filters and ordering as per your preferences.  Lets say that you have included a profit margin field within your product database, you could use the following query to return your search results:

SELECT * FROM data_table
WHERE description
LIKE %$query%

With control over your own search function, optimising for internal search is not necessarily about creating content that approximates to the requirements of what you think a set of algorithms consider relevant, its about creating your own rules to order your content the way you want your users to see it.  In the words of McFly: