in

Janae’s Blog

Windows 7 Federated Search - website considerations

Introduction 

Windows 7 offers a feature called Federated Search which allows users to search internet sites from within Windows Explorer.  Windows Explorer uses the search functionality provided by these internet sites and displays the results in a familiar and user-friendly way.  The search results can be links to webpages, or links to actual files - images, PDF documents, etc. 

Windows Explorer offeres several different ways of displaying the results.  In this example, the Channel 9 website (http://channel9.msdn.com/) is being searched using the Federated Search.  Here, I have the results shown in the 'Content' view, with the 'Preview' pane visible.  This allows me to quickly see the results, as well as open the webpage (or file) directly in Windows Explorer.

In this example, I specified the results to be shown in a 'Detail' view, which allows me to see several pieces of information at once, including the article name, author, and date it was created. 

One very useful feature offered is the 'Save Search' button just above the results pane.  Clicking this button will create a shortcut to the specific search and place it in your 'Favorites' folder within Windows Explorer.  This makes it very simple to find and execute queries important to the user.

Using Federated Search 

There are three main steps to creating a successful Federated Search: Enabling the remote website to handle queries, create the OpenSearch description file, and deploying the description file.  In this article, I will mainly focus on the considerations a website programmer should have when building search functionality, to make the Federated Search most useful.

First of all, though, here is a very simple OpenSearch description file (OSD). This file is configured to search the Channel 9 website. To use this file, copy the XML contents below to a text editor, and save the file using extension .osdx.

<?xml version="1.0" encoding="utf-8" ?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
        <ShortName>Channel 9</ShortName>
        <Url type="application/rss+xml" template="http://channel9.msdn.com/Search/feed/rss?Term={searchTerms}" />
</OpenSearchDescription>

To deploy this file, copy it to your Windows 7 machine (if not already there) and double click the file.  Windows 7 will prompt you to confirm that you want to add this search connector.  Click 'Add' on this popup dialog.  This search is now saved if the 'Searches' folder of your user, with a shortcut saved in the user's 'Links' folder.  This shortcut will appear in the 'Favorites' section of the Windows Explorer left-hand navigation.  Note: Another way to deploy the OSD file is to post a link to it on your website.

Website Considerations

  1. Accept a Query
    When building your website, if you want the user to be able to search your site using the Federated Search, there are a few things you must do.  You must provide search functionality to the contents of your website and the results of the search should be exposed in XML format - by RSS or Atom.  An example of this kind of search can be found on the Channel 7 website (http://channel9.msdn.com).  On the search results page, there is a link to 'Subscribe to these search results.'  It is particularly important to have specific RSS feeds for the search results, where the search term(s) are passed to the RSS URL through query string.  This query string is used by the Federated Search to pass the search term the user types in the search box of Windows Explorer

        For example, the RSS URL for Channel 9 is: http://channel9.msdn.com/Search/feed/rss/?Term=terms

    In the OSD file, this URL should be specified in the <Url> tag that uses type 'applications/rss+xml'.  Use the token {searchTerms} in the URL as a placeholder for the terms a user enters in Windows Explorer.

    The OSD entry would look like this:

         <Url type="application/rss+xml" template=http://channel9.msdn.com/Search/feed/rss/?Term={searchTerms} />
  2. Initial View in Windows Explorer
    When the user first opens Windows Explorer and clicks on the shortcut to the Federated Search for a website, they will see a blank results pane before submitting any search terms.  In order to display an initial view of items (for example, the most recent blogs posted to your site), another <Url> element specified in the OSD document.  The URL specified in this tag should not include the {searchTerms} token, should be of type 'application/rss+xml', and rel should have 'itemlist' specified.

         For example, the generic RSS feed for Channel 9 is: http://channel9.msdn.com/Feeds/RSS/

    The OSD entry would look like this:

         <Url type="application/rss+xml" rel="itemlist" template="http://channel9.msdn.com/Feeds/RSS" />
  3. HTML View of search results
    The results of a Federated Search are shown within Windows Explorer, but there is also a way to link the user to the same results on your website.  Just above the search results, the user will see a "Search on website" button. 



    To configure this, first, your website must have a webpage that displays the search results based on terms passed in a query string. 

    For example, the webpage view of search results on Channel 9 is: http://channel9.msdn.com/Search/?Term=terms

    Secondly, a <Url> element must be added to the OSD file:
       
        <Url type="text/html" template="http://channel9.msdn.com/Search/?Term={searchTerms}" />

Other notes 

In my opinion, I can see the Federated Search becoming a highly used feature of Windows 7.  It would be incredibly useful to a user who has a particular set of sites they search frequently - as long as the websites are set up to handle the Federated Search features.  Another way to help users setup your site in their Windows Explorer is to provide them with an OSD file that is configured to give the best user experience possible. There are many options that allow you to create a highly customized user experience within Windows Explorer, including paging, results count, and layout of the results.  Please see the Additional Resources section for links to additional documentation about other features of the Federated Search. 

Additional Resources

Windows 7 Federated Search Provider Implementer's Guide
Federated Search in Windows

Published May 18 2009, 10:12 AM by jallen
Filed under:

Comments

 

free blog layouts said:

Looking for perfect solution to manage banners and custom blocks at your store? Tired editing your store template for each new advertisement? Then Easy Banners is right solution for you. Easy Banners is based on Magento core functionality and built to

May 16, 2010 2:07 PM
 

Graco Nautilus 3 In 1 Car Seat said:

Great One maintain doing the good work I have pointed out your site on my blog see it here www.graconautilus3in1carseats.com/.../graco-nautilus-car-seat

May 16, 2010 6:16 PM
Powered by Community Server (Commercial Edition), by Telligent Systems