Nov 12

OneRiot has entered your Google

Search, Tech with tags: , 11 Comments »

Tobias Peggs told me about the rebranding of Me.dium to OneRiot to show the change in direction from a “social browsing” company to a real-time search solution.

As a little experiment, to coincide with their launch today, I whipped up a little bit of Greasemonkey goodness in the form of OneRiot in your Google.

The premise is simple, and you have probably seen it before. When you do a Google search, this userscript will head over to OneRiot to do the search there. The top result will then pop-in to the results.

I always tend to do something like this when a new search engine comes out. I am not mentally going to switch from using Google, so bring the mountain to Mohamed and plug in the top result to Google itself. This way, if it shows me something truly new (read: not the same as what Google gives me and still useful) then I will maybe pay more attention to it in the future.

Most of the work itself is infrastructure crud to get around loading up jQuery. Oh for a better way to load standard libraries!

// ==UserScript==
// @name          OneRiot in your Google
// @namespace
// @description   Add a riot to your Google
// @include       http://**
// ==/UserScript==
(function() {
	// Add jQuery
	var $;
	var query = parseQuery();
	var oneriotURL = '' + query;
	var script = document.createElement('script');
	script.src = '';
	script.type = 'text/javascript';
	// Check if jQuery's loaded
	function jQueryCheck() {
		if (typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(jQueryCheck, 100); }
		else { $ = unsafeWindow.jQuery; jQueryReady(); }
	// The Real Work
	function jQueryReady() {
		    method: 'GET',
		    url: oneriotURL,
		    onload: function(response) { // Get the first result from OneRiot
				var resulttitle = response.responseText.match(/(\<a class="result_title".*?\<\/a\>)/)[0];
				if (resulttitle) {
					var title = $(resulttitle);
					var url = title.attr('href');
					var text = title[0].textContent;
					var result = '<div id="oneriot" style="padding: 2px;"><a href="" title="Visit"><img src="" border="0" style="margin-right: 4px;"/></a> <a href="' + url + '" title="View the OneRiot result">' + text + '</a> <a href="' + oneriotURL + '" style="color: #3399FF; padding: 0 8px;" title="See more results for this query on the website">more oneriot results</a></div>';
					$('#ssb').after(result); // Add it to the Google DOM at the top
	// Get the Google query from the query string
	function parseQuery() {
		var result =\&q=(.*?)\&/);
		if (result && result.length > 0) {
			return result[1];

OneRiot at Google

OneRiot seems to do well for certain queries. This example does a good job at showing it off. In the Obama search, instead of just getting, it shows recent news. That is why it is a nice complement to traditional search engines.

Kudos to the OneRiot team on the launch!

Apr 22

Groovy Lucene

Groovy, Java, Search, Tech 4 Comments »

Lucene is one of my favourite opensource packages. I often find that I do need to ’script’ it so to speak, and Jeremy Rayner has shown how Groovy fits in.

He has taken some examples from Lucene in Action, and made them Groovy.

Very nice.

Apr 20

Google Personal, one step closer

Google, Search, Tech 2 Comments »

I have been wanting more of a personal touch from Google for awhile, and it looks like they are coming up with the goods.

Google Labs just came out with Search History, in beta.

Now you can choose to tell Google to watch over you and help out.

There are definitely privacy issues surrounding some of the more ‘out there’ personal search features (e.g. social networking ‘those who searched also searched’) but it is great to see this first step, and I look forward to more!

I always like the integrated experience with Google. When I sign up for something I don’t have to go to a DIFFERENT place. is still the entry point and it just knows that I want a personal touch.

Apr 20

Argos: Simple Java Search Engine Wrapper API

Java, Search, Tech 2 Comments »

Nick Lothian has put up a 0.1 release of a nice Search Engine wrapper API called Argos.

About Argos

Argos is an open source (Apache licenced) Java library for accessing the search APIs provided by internet search engines. It provides a consistent, extensible and easy to use API, while supporting advanced features such as a paged request model and a simultaneous search across multiple engines.

Argos currently supports the following search engines:

  • Blogdigger
  • Feedster
  • Google
  • Google Desktop Search
  • MSN Search
  • Technorati
  • Yahoo

Here is an example of running a simultanous search on MSN and Blogdigger:

List<Searcher> searcherList = new LinkedList<Searcher>();
searcherList.add(new MSNWebSearcher());
searcherList.add(new BlogdiggerWebSearcher());

SimultaneousSearcher searcher = new SimultaneousSearcher(searcherList);

Iterator<SearchResult> it ="Java");
while (it.hasNext()) {
SearchResult result =;
System.out.println(result.getTitle() + " Address: " + result.getAddress());

A nice simple API, and one consistent one for a group of search engines.

Mar 01

Meet Lucene via Erik Hatcher

Java, Open Source, Search, Tech 1 Comment »

Erik Hatcher has published a Meet Lucene online presentation (slides + audio).

The presentation is a nice introduction to Lucene. There are still a lot of people out there who do not know about this open source gem, and if you haven’t had a chance to check it out, watch this.

One of the best reasons to watch it, is that you learn what Lucene IS and ISN’T. I still find that people assume it is a web crawler, rather than a search API.