James O'Neill's Blog

February 12, 2009

Windows 7 federated search.

Filed under: Beta Products,Internet Explorer,RSS,Windows 7 — jamesone111 @ 1:08 pm

I was a little surprised to find it was nearly 3 years ago that I first wrote about Open Search… So first off… 

Open search provides a specification for XML to describe search services. It’s easy to build this XML, and there’s a Microsoft Page which builds it for you, so here’s an example for IMDB, which I need to add to my Windows 7 installation:

<?xml version="1.0" encoding="UTF-8" ?>

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">


<Description>IMDB provider</Description>


<Url type="text/html" template="http://www.imdb.com/find?s=all&q={searchTerms}" />



The XML tells something like IE 7 and 8 that there is a search, with a name and a description, and the URL to search it and return data as Text/html. IE can use a Link tag on a page that you are viewing to enable a context sensitive search here’s an example from OpenSearch’s own site.

<link rel="search" type="application/opensearchdescription+xml" 
     href="/opensearch_desc.php" title="OpenSearch (English)" />

That was as far as my interest went when I first heard of Open Search, but there is a use for these descriptions in Federated Search. Federated simply means taking the results of more than one search and merging them together. But if every site comes back with an HTML page that is no good for merging, so Open Search defines an XML schema, or to be more accurate it defines extensions to RSS and Atom. Now the Description file can contain another URL line which specifies a type of “application/rss+xml”, or “application/atom+xml”. Each item in the RSS feed becomes a search result, and any search services which can return RSS format can be included in a federated search.

We already use that in our Enterprise Search products. What’s new for Windows 7 is that we use an OSDx (Open Search Description XML file) to add Federated Search parts to Windows Explorer. As far as I can tell, plain Open Search files can be used for this, but there is extra information which can go in, and the best place to start is this post by Brandon. So a OSDx file for twitter looks like this.

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <Description>Search for a person @name, tag, #tag or anything  else</Description>
  <Url type="application/rss+xml" template="http://search.twitter.com/search.rss?q={searchTerms}"/>

and the results look like this (click for a bigger version).


The key thing is that this could be any site (internet, intranet you name it) which can return search results as RSS or Atom, and once the search is defined you put a shortcut to it anywhere you’d have a shortcut to a folder.

This post originally appeared on my technet blog.


Create a free website or blog at WordPress.com.

%d bloggers like this: