Windows 7 Federated Search

    Windows 7 Federated Search


    Posted: 18 Apr 2010
    Federated search enables users to search remote data sources from within Windows Explorer. This means that from within Windows Explorer, you can search those Web sites, feeds, and other structured remote data sources that make themselves searchable with a simple Web front end that exposes their search capabilities. You can use the search box in Windows Explorer just as you do when searching your own content. Search results are displayed in the same way, including coloring and even file preview. The results behave just as you would expect from items listed in Windows Explorer, as shown in the following image:



    The benefit of integrating your data source with Windows Explorer is that users can get at all of their information by using the already familiar Windows Explorer user interface. Your users will be able to see files from your remote data source just as they would local files, including the right application icons and context menus. They can preview documents or Web pages, see thumbnails of images, and drag and drop a file directly to the desktop or into an e-mail. Please note in the above picture that the files are from flickr.com and I am still getting the size, name, tags, date modified, and so on.

    In this post, based on the Windows 7 Federated Search Provider Implementer’s Guide, you learn what federated search is and how it works. If you are interested in using federated search or in creating your own search provider, please read this guide.

    How does it work?

    Windows 7 supports hooking up external sources to the Windows Client via the OpenSearch protocol. The OpenSearch v1.1 standard defines simple file formats that can be used to describe how a client should query the Web service for the data store and how the service should return results to be rendered by the client. Basically, this means that you can point Windows Explorer to an external data source. Using the standard OpenSearch protocol, Windows Explorer submits the search query and the remote data source returns a well-formatted data structure that can then be parsed and presented to the user.

    To add a new OpenSearch provider, you need to “install” a Search Connector Description file (a .osdx file). The internal file format for a .osdx file is an OpenSearch Description XML document. Here is the content of a Flickr search osdx file:

    </span span style="color: #ff0000"version/spanspan style="color: #0000ff"="1.0"/span span style="color: #ff0000"encoding/spanspan style="color: #0000ff"="UTF-8"/span?span style="color: #0000ff"> <span style="color: #0000ff"> Flickr Search OpenSearch for Flickr via Windows 7 Search Federation. <span style="color: #0000ff">

    Note how simple the file is. It basically includes a URL to Flickr search that specifies the searchTerms, which is the search query. For more information please go to OpenSearch v1.1 standard. Those of you who have a good eye and a good memory might think that the above XML looks a lot like an Internet Explorer 8 (IE8) Search Provider Extension – you know, the little search box on the top right of IE8 that lets you choose the context in which you execute a search. This is interesting enough so that you can expect a future post on how to convert an IE8 Search Provider to a Windows 7 Federated Search.

    End users have several options for installing a new remote data source with Windows federated search: they can open a .osdx file by clicking on a link to one on a Web site or by opening one provided by someone else on a share or via an email attachment. This creates a .searchconnector-ms file in the Windows “Searches” folder (%userprofile%/Searches) and places a shortcut into the “Links” folder (%userprofile%/Links). This shortcut shows up in the Windows Explorer navigation pane Favorites section.

    The communication between Windows Explorer and your OpenSearch Web service is done through the Windows Data Layer, which can communicate with various data source types via what are called Windows Store Providers. Each provider specializes in communicating with data stores that support a particular protocol and have specific capabilities. The OpenSearch provider communicates with data stores that have a Web service that supports the OpenSearch standard.

    Let’s give it a try. Please click here to download (install) a Flickr search connector. You will be prompted to either save or open the file. Choose Open to actually register the search provider on your computer. Then, you will be prompted to Add a Search Connector. Accept by pressing the Add button as shown in the following image:

    Note that a new shortcut named Flickr Search is added to your Favorite’s navigation pane. Click that shortcut, and then type Seattle in the Windows Explorer search box. Wait few seconds as the results are being streamed from the Flickr Web site.

    Behind the scenes, when the user types a term into the search box in the upper right hand of Windows Explorer, the query is sent to the OpenSearch provider (described in the .searchconnector-ms file), which then sends the query to the remote data store (the URL that contains the “searchTerms” in the osdx file). The remote Web service responds to the query with results in an XML document in either the RSS or Atom format. The OpenSearch provider parses the XML elements of the results into items which eventually make it back to Windows Explorer where they are displayed to the user. The following picture illustrates the flow of data:

    There are three steps to getting your data store’s Web service connected to Windows 7:


    1. Enable the data store to be searched from Windows using OpenSearch with RSS or Atom output.
    2. Create .osdx files that describe how to connect to the Web service and how to map any custom elements in your RSS or Atom XML.
    3. Deploy the search connectors to Windows client machines using the .osdx files.

    &#160;

    The OpenSearch protocol gives you a lot of hooks into the system to customize the way results are displayed within Windows Explorer. For example you can:


    • Create a template for initial queries
    • Set the maximum results count and create pages
    • Customize the results view
    • Map properties to the Windows Explorer property system
    • Generate tooltips

    There is a lot more to learn about how to create your own OpenSearch provider. If you are interested, read the Windows 7 Federated Search Provider Implementer’s Guide and view the Federated Search video created by Sasha Goldstein, one of the Introducing Windows 7 for Developers authors.


    More...
    z3r010's Avatar Posted By: z3r010
    18 Apr 2010



  1. Posts : 91
    Windows 7 Professional x64
       #1

    Just an idea... So, if SevenForums sets up their own OpenSearch web service, we could search these forums straight from Windows explorer?
      My Computer


  2. Posts : 1,360
    Windows 7 Ultimate x64
       #2

    That would be very interesting if you could do that, use windows search to find answers to problems from the forums.
      My Computer


  3. Posts : 18,404
    Windows 7 Ultimate x64 SP1
       #3

    windows7user said:
    Just an idea... So, if SevenForums sets up their own OpenSearch web service, we could search these forums straight from Windows explorer?

    There already is. The federated search isn't new to Win 7. It's been there.
    Windows 7 Federated Search Providers
      My Computer


  4. Posts : 1,806
    Windows 7 Ultimate x32
       #4

    Interesting. I will have to play around with that, when i have the time.
      My Computer


  5. Posts : 195
    Windows 7 Ultimate x64
       #5

    Interesting stuff. I've been using Copernic Agent Professional for some years, which is at least vaguely similar in the results it provides. It's kind of old-school in the way it works, but I'm kind of old-school myself.

    Copernic Agent - More Than a Simple Web Search Engine

    Bye.

    PS. Copernic Agent Pro is not fully compatible with Windows 7. It needs either the use of virtual XP mode, or setting the shortcut for XP SP3 compatibility. Only Agent Personal is W7 compatible.
    Last edited by Crunchy Doodle; 19 Apr 2010 at 10:01. Reason: added a note
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:56.
Find Us