Monday, February 5, 2007

MondoSearch for Sitecore (Part 4)

Like all good trilogies, this one comes in more than 3 parts :-)

The last little detail in the integration I want to show is the overall architecture. The entire integration between the products are based on 4 key XML WebServices, provided by the MondoSearch products and consumed by the integration within Sitecore.
These are:
  • MondoSearch Search WebService
    Probably the most important WebService. This is the service that handles all the searches. It takes a query in MQL (Mondosoft Query Language), performs a search, and returns results as a dataset. It's used by the search/result pages, the editor search as well as the Similar Pages code example. It's possible to have the integration working only with this service enabled - although naturally all other features than search in the integration will be disabled.
  • MondoSearch Admin/Crawler WebService
    This service can control the MondoSearch crawler as well as doing some essential setup and configuration - like adding starting points, reporting on crawler status, etc. It takes MQL and a connection string (holding user name and password and license key) as input. It's used in the Crawler Control application and the Start Crawler task.
  • BehaviorTracking WebService
    This is the service that extracts all the important information about the users search behavior from BehaviorTracking. Once again it's based on MQL and Datasets which makes it easy and standardized to use. It's used all over - in the BT Portal, Term Details, Related Topics, Item Details, autocomplete searchbox, etc.
  • InformationManager WebService
    InformationManager is typically used by the webmaster or marketing dept. to optimize the search based on user behavior. This could be by adding SearchHeaders (custom pieces of HTML in the top of the search results, based on query), SearchNames (direct link to a specific page for a given search query), synonyms (goes without saying) and so on. The webservice provides easy MQL based access to all these features. However the only feature thats included in v.1.1 of the integration is SearchHeaders - so here's room for improval :-)

Since all of this is based on WebServices it's easy to imagine how you can split up your servers. It's quite easy to have a hosted search solution, as well as hosting the search yourself. You could even host it yourself each product on a different server, and have a fallback hosting scenario setup if company policies requires it.

Another benefit that I find really cool is that the integration leaves room for adding your own components based on the search/behaviortracking functionality, since the classes used to call the webservices are public. Just imagine the possible awesome features it's possible to implement on your site. For instance how about adding a "Personal Suggested Links" box on the front page, based on the visiting users history of searches/browsing on your site?!
Or how about implementing your very own "Local-by-global" search which catches the queries from Global search engines that led users to your site and performs a local search on them, suggesting other relevant pages?!
And the code is pretty simple. In order to perform a search simply write something like this:

using Mondosoft.SitecoreIntegration.Search;

private void DoSearch(){
ServiceWrapper service;
DataSet results;
service = new ServiceWrapper(Configuration);
results = service.ExecuteSearchMql("OPTIONS Query='Sitecore' "+
"LIMITS FirstResult=0 MaxResults=5");


I hope a lot of partners and customers will pick up this challenge and make some really cool implementations of this. Now it's up to you guys :-)

No comments: