I spend a fair amount of time talking to clients and potential clients on how best to integrate Sitecore and Telligent Community into a seamless experience. Every customer is different when it comes to how this experience is built, however one of the most common questions that comes up is how do we handle searching the whole site.
The first and simple option is to provide 2 sets of search results on one page, this provides the results but it's not very rich experience. The second option is to aggregate the results into a single set, allowing the user to experience a data set that can be faceted and filtered. Up to this point the way to aggregate the data would have been to perform 2 queries and then munge the results together, this is both inefficient and a lot of hand cranking of data.
As of today we have updated the 4 Roads website with an alternative solution, that I will try and describe in this blog post.
Both Sitecore and Telligent can use SOLR as their search index provider, however the schema they use is completely distinct additionally it's not clear how either system would handle having additional documents in the index. Shards to the rescue! Fortunately version 4+ of SOLR supports sharding in multiple cores. Sharding is normally used to split data into shards for performance and scaling reasons, however sharding can also be used to allow us to do a clever trick.
By creating 2 cores in SOLR and pointing Sitecore and Telligent at the individual cores we are able to have both applications writing to effectively a single index, although both applications only ever see their data. With a little bit of configuration it is possible to then query both cores for an aggregated response.
From the application perspective we needed to build an MVC rendering and controller that is capable of querying for the data and displaying it, this is pretty simple, the only catch was to ensure that we included the security data in the request so only documents that the user has access to are returned.
If this article has wet your appetite and you would like to see it in action, simply use the search on this site. If you would like to see if we can help you please do contact us.