Google Custom Search for Planet Code4Lib

Posted on 2 minute read

× This article was imported from this blog's previous content management system (WordPress), and may have errors in formatting and functionality. If you find these errors are a significant barrier to understanding the article, please let me know.

I wanted to mess around with Google's new Custom Search Engine feature and in casting about for a list of URLs to feed it I thought I'd try the list of blogs at Planet Code4Lib. As it turns out, this might be a modestly useful search if you remember reading something from one of the code4lib bloggers but can't remember which one. The exercise was pretty fun and here is the result:

To build it, I started with the Planet Code4Lib OPML feed and ran some regular expression transformations against it, replacing these matches with empty strings (I used BBEdit on the Mac for this one-off, but it could probably be automated with a PERL script to a certain degree):

(\?|<pre wp-pre-tag-0></pre>|<pre wp-pre-tag-0></pre>amp;)feed=(atom|rss2)$
(\?|<pre wp-pre-tag-0></pre>(amp;)?)feed=(atom|rss2)(<pre wp-pre-tag-0></pre>(amp;)?)

After a minimal amount of manual cleanup, I ended up with this list:******************************************************************

...and fed that into the Google Custom Search control panel.

Items of note in the Terms of Service

Along the way I found some curious bits in the Google Custom Search Terms of Service. In particular:

1.5 Exclusivity. You agree that, during the Term, Google will be the exclusive provider of Internet search services on the Site. You further understand that Google will provide the Service on a nonexclusive basis, and that Google will continue to customize and provide its services to other parties for use in connection with a variety of applications, including search engine applications.

Section 1.1 defines Site this way:

For purposes of the Terms of Use, "Site" shall mean the Web site or sites on which You place JavaScript or similar programming ("Code") which renders the Google search box (or other means used by users of the Site ("End Users") to enter a search query ("Query")) on the Site ("Search Box").

One suspects what Google meant was that if you put up a Custom Search Box on your Site, then you must also use Google for any general internet search you might have -- you can't have a Google Custom Search Box and a Yahoo search box on the same Site, for instance. I imagine that this also effectively locks out other internet search engine providers from offering the same service. Since Google is the first-to-market, if Yahoo were to come up with a similar service you couldn't put a Google Custom Search and a Yahoo custom search pointing to each providers indexes with the same subset of URLs. Since we know that each index contains different stuff and ranks results with different algorithms, one might imagine that the same custom search segments over a multiplicity of indexes could be a useful thing.

Ah, well -- it is still useful. Just go in with your eyes open...

The text was modified to update a link from to on January 13th, 2011.