Integrating Google Enterprise Search with Social Bookmarking
June 20th, 2007by Jeremy Thomas

I don’t generally write technical posts, but the geek inside me wanted to share some insights into how to “mashup” Google Enterprise Search and Social Bookmarking. Here’s what you’ll need:
- A Google Mini or Google Search Appliance
- Scuttle - an open source, delicious-like social bookmarking application
- Xalan - a Java-based, open source XSLT engine
The Value Proposition
The idea behind this is this: when a user performs a search, each of the results on the page display social bookmarking information (tags and “saved by” count) if that URL has been bookmarked by somebody within the enterprise. This helps the searcher make an more informed choice when deciding which content to look at. If somebody else inside the enterprise has found a relevant content item to be helpful then perhaps the searcher should look at it first. It also exposes the searcher to others within the enterprise who have a mutual interest in the content being looked for.
Technical Mumbo Jumbo
Out of the box the Google Search Appliance provides a great amount of flexibility in modifying how search page behaves and feels. This is done through modifying the default XSLT (which produces a UI nearly identical to google.com). So, ideally all I’d have to do to include scuttle into the search results is use the document() XSLT function invoke a scuttle API that returns XML data about the URL (including the tag list and saved by count). I could then aggregate this XML with Google results XML displaying a seamless result to the user. Unfortunately the Google Search Appliance XSLT engine does not support the document() function, so I’m left to run an external XSLT engine - hence Xalan.
So, here’s what I did:
- Downloaded Xalan and made some minor tweaks to the “SimpleServlet” demo application (class and package name change, modified the configuration to use my XSLT and invoke the Google Search Appliance to retrieve the results in XML format).
- Packaged the modified version of the “SimpleServlet” and deployed it on my Tomcat instance.
- Copied the Default XSLT style sheet from the Google Search Appliance, and modified it starting at line 2398 (the XSLT template for a snippet) adding code to invoke the Scuttle API and incorporate tags and saved by count at the bottom of the snippet. Saved the XSLT and bundled it with my “SimpleServlet” war file.
- Copied the scuttle “posts_get.php” API and made a new API that returns bookmark information for a given URL.
That’s it. Users now access my custom web application to perform enterprise searches (instead if using the default GSA frontend), but so far so good. Hopefully one day Google will support the document() function so we can do integration like this using the XSLT engine on the appliance. That would certainly make life a lot easier.




Follow Me
June 20th, 2007 at 1:44 pm
Nice work, Jeremy. I am google engineer working on the GSA, and it’s great to see our user community coming up with innovations and extensions like this.
June 20th, 2007 at 3:05 pm
Cool, thanks David. Any plans to add support for the “document()” function to the GSA XSLT engine?