Federated Search in Windows 7

One new feature in Windows 7 (Ultimate or Enterprise) that hasn’t had much coverage is federated search.  This is, essentially, a way to allow searching of damn near any resource from within Windows.  Here’s how a search on TechNet looks:

image

Because the results are represented as files (shortcuts, actually), you can now work with your search results just like any other set of files.  You can copy them into a folder, right-click them and click Print, drop them on the Start button to pin them to your Start menu, or view your results in any of the usual Windows Explorer views.  For example, here are the results of a YouTube search:

image

And how do you get at all this magic?  Well, this is a case where Microsoft actually got things right.  First, everything is based on the simple standards-based OpenSearch format.  Basically, this means your data source has to support RSS, and you need a simple XML file telling Windows how to access the data.  These files (usually going with an .osdx extension) are pretty simple, and opening one on Windows 7 will automatically set everything up for you.

Want to try?  Here are some good examples:

Some of these come from SevenForums.com, where you can find a wealth of other information on federated search.

Notice anything missing here?  There is a search engine called Google that still fulfills a small niche among certain people that isn’t really easy to use.  This is because Google doesn’t support OpenSearch, and as far as I know, doesn’t intend on doing it any time soon.  There are ways around this, of course, but none are particularly elegant.

Curious as to how this all works?  Well, just have a look at an example .osdx file.  Here’s the YouTube one:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:ms-ose="http://schemas.microsoft.com/opensearchext/2009/">
<ShortName>Youtube</ShortName>
<Description>OpenSearch Youtube via Windows 7 Search.</Description>
<Url type="application/rss+xml" template="http://www.youtube.com/rss/tag/{searchTerms}.rss&amp;num=10&amp;output=rss"/>
<Url type="text/html" template="http://www.youtube.com/results.aspx?q={searchTerms}"/>
</OpenSearchDescription>

As you can see, there’s really not much here beyond a bit of meta information and a reference to the web-based RSS service.  Pretty simple, yes?  This means implementing this search ability in your own applications shouldn’t be all that hard, either.  This makes for a really easy way to integrate your application into Windows.

For more details, check out OpenSearch.org.

1 comment:

  1. Khi về già người ta thường ân hận điều gì ?
    Chiều nay có một niềm vui nho nhỏ... khi cafe đứng lên, một bạn gái
    dịch vụ kế toán trọn gói quận 5
    dịch vụ kế toán trọn gói quận 6
    dịch vụ kế toán trọn gói quận 8
    buổi cuối cùng ở cái mảnh đất Hà Nội này...
    Tôi lại nhớ tới comment hôm nọ của một bạn: "em gặp anh lang thang đi

    ReplyDelete


Copyright © 2010 Paul Guenette and Matthew Sleno.