Projects » Silverstripe/PHP Projects » Integrating the JRank Search Engine into a Silverstripe Site

Integrating the JRank Search Engine into a Silverstripe Site

JRank LogoI have often found that Google and Yahoo are better at finding content on a website than the website's own search engine. The reason for this is that their respective search engines are much better at matching keywords to the content of a page.  What most websites appear to be missing, is a page indexing system that analyses pages, extracts keywords, and ranks their importance/relevance. Simply using SQL queries to search pages that are stored in a database is not going to return results with the most relevant pages returned first.

Silverstripe websites are no different. Whilst Silverstripe's search engine may be improved over time; right now, the results are often not what I am looking for, and searching through all the results pages is too time consuming. Silverstripe's search engine is no match for a search engine that performs indexing and ranking. Thus, the search for a search engine that could be integrated into the website began.

At first I looked for a PHP based search-engine that could be run on the server itself. Sphider looked promising; it performs indexing and has many features. Unfortunately, it had many conflicts with functions in Silverstripe, and would have taken a large amount of time to refactor and integrate into Silverstripe. Whilst it could be run in parallel to Silverstripe, and even be made to look the same; I wanted users to interact with only one system; and having a separate set of templates to modify every time that a change is made to the site would be too time consuming.

The JRank Search Engine

JRank is a free hosted search engine. This means that the search engine and its indexing spider (or web-bot, whichever you prefer) is run on a different server. It has a REST API, which enables it to be fully integrated into a website; all that is required is code in the website's to send requests to the JRank server, and display the returned results.

The JRank and Silverstripe Integration Project

This project integrates JRank with a Silverstripe site, and is currently in use on this website. It uses JRank's REST API in order to submit queries and obtain results. These results are then displayed on a search results page, which can be customized via a template. The files can be downloaded below, and installation instructions can be found on this page.

Current Status

This project is essentially finished; after all, this website uses has an integrated JRank search engine. However, it is not the cleanest integration. Ideally, this would be turned into a Silverstripe module. At this stage, there is little motivation to do so, since the current solution works well. If there is sufficient interest, I might consider turning it into a module. Alternatively, if someone else turns it into a module, they should let me know, and I will update this section to include their work (with appropriate acknowledgements, of-course).

 Download

The files belonging to this project are contained in the following archive:





Projects » Silverstripe/PHP Projects » Integrating the JRank Search Engine into a Silverstripe Site