Building Federated Location Definition Files and Integrating Search Server 2008 with Live Search

Creating FLD files for Search Server 2008 is not as hard as you might think. In this section, we’ll walk you through how to create FLDs and give you some tips on important synergies between Search Server 2008 and

The biggest effort in building an FLD using the Search Server 2008 interface is obtaining a result set from a remote indexing engine that can be transferred via RSS or Atom. Once you have that, building the FLD is very easy. If the results come back in HTML/XHTML, then you’ll have to do some custom coding to get those results to appear in your Search Server 2008 Search Center. That customization work is beyond the scope of this chapter and book, so if you need to build out connector Web pages in Search Server 2008 for HTML/XHTML result sets, we suggest you check the main Search Server 2008 Web site at for more information.

Let’s run through the steps that are necessary to build out a new FLD. To start, let’s assume that we want to create an FLD to query MSDN online from our Search Server 2008 interface. Following are the steps we’ll use to accomplish this task. First, open a browser to, as illustrated in Figure 14-13.


Figure 14-13 Search interface at

Now, we’ll search on a keyword. It doesn’t matter what keyword we use for this illustration, so we’ll use the keyword SharePoint. The result set URL is the most important element that we’re interested in receiving. In our example, the result set URL (also illustrated in Figure 14-14) is\&brand=msdn\*loca =&refinement=00&lang=en-us.

At this point, Search Server 2008 couldn’t use the results because they came back using HTML. The results must be converted into an RSS feed to expose the URL that will return the results using RSS. To do this, click the RSS button in Internet Explorer 7 (as shown in Figure 14-15), which will provide the required RSS URL.

The created URL is\&bran =msdn&local=&refinement=00&lang=en-us&feed=rss.


Figure 14-14 Result set URL


Figure 14-15 RSS button in Internet Explorer 7 that will create the RSS feed URL

The last part of the URL, feed=rss, indicates that the results will be returned in the RSS format. At this point in the process, you can return to the Search Server 2008 administration interface and select New Location on the Manage Federated Locations page. In the Query Template input box, enter the RSS-based URL, replacing the search term with the query variable “{searchTerms}” (shown in Figure 14-16). Enter this same URL in the More Results Link Template input box as well. Be sure to enter a location and display name as well as a description (which is required by the OpenSearch standard). Be sure to add the same URL to the More Results input box when building the FLD.


Figure 14-16 Entering the RSS URL in the Query Template input box using the searchTerms variable

Note  In the Location Type of the FLD, you can select either the Search Index On This Server radio button or the OpenSearch 1.1 radio button. Even if you build out the FLD the way you want with a correct URL pointing to a remote index, if you leave the Location Type selection at Search Index On This Server, the Federated Results Web part will return results only from the local index.

Part of building out a new FLD is deciding if you want any triggers created with it. Triggers allow you to throttle, or define, when the FLD is invoked based on the query search terms. Your choices are as follows:

  • AlwaysAlways be invoked regardless of what query terms are entered by the user
  • Prefix Invoked only when an exact string of characters are entered as the first set of characters as part of the overall set of query terms
  • Pattern Invoked only when a consistent pattern of characters is detected as the first part of the overall query search terms. This pattern option allows your developers to write custom code as the specific pattern.

At this point, accept the other defaults, then scroll to the bottom of the page and click OK. You’ll now have a new FLD in your list. Once you have defined this information for the FLD, you can build it out and use it in your Search Center.

To apply this FLD to the queries that are entered by the users, you’ll need to open the Search Center and edit the results.aspx page that hosts the various Results Page Web parts. The FLDs are applied to the Federated Results Web part on the results page.

Once you’ve entered Edit mode on the results.aspx page, navigate to the current Federated Results Web part or add another instance of this Web part on the page in one of the Web part zones. Once you’ve focused on the Web part, click the Edit Drop-Down button and then click Modify Shared Web Part. In the Location drop-down list, select the MSDN FLD file and then click OK (see Figure 14-17).


Figure 14-17 Selecting the MSDN FLD in the Federated Results Web part Location drop-down list

After the Web part has been configured, it’s time to exit Edit mode and test the new FLD by executing a query. For our example, we selected sharepoint again as our keyword for testing the new FLD. When the query is executed by the user, the query is sent not only to the local index but also to the remote index(s) that are defined via the Federated Results Web part and the FLD that has been associated with each instance of this Web part. If you fill your results page with these Web parts, with each sending the query to a different remote index, be prepared for high latency while all of the remote indexes are queried and their results are returned to the Query server for processing and display within the interface.

In this running example, as you can see in Figure 14-18, the FLD was built accurately because it sent the query to the search engine at, and the results were successfully returned to this Search Center.


Figure 14-18 Successful query of both the local index and the remote index at

< Back      Next >



© Microsoft. All Rights Reserved.