![MCj03832420000[1]](/Lists/Posts/Attachments/17/MCj038324200001_thumb.png)
Today I'm going to walk you through setting up a Federated Location in Search Server and post-Infrastructure Update SharePoint. (Twitter fans, pay attention, as that's the service I'm using in these examples...) While that certainly qualifies as "Back to Basics", that's just "Part 1". I'm not stopping there. The second part of this article will to show you how to take it to the next level by using SharePoint Designer's XSLT Data View editing capability. I'm even making the Location definition files available for you to download and use in your own sites!
What is Federation?
When Microsoft introduced Search Server (MSS) and Search Server Express (MSSX), they introduced the concept of "Federation". With the Infrastructure Update, they brought Federation directly into Microsoft Office SharePoint Server (MOSS). Federation allows users to send the same query to multiple independent repositories, and display the results from each in its own region on a results page. In the example below, the query "SharePoint" is not only generating results from the internal site, but from Live.com search as well.
Note that with Federation SharePoint and Search Server aren't crawling the content themselves. They're just acting as the "middle-man". All SharePoint or MSS/X are doing is passing on the query, then receiving, formatting, and displaying the results. The other service is doing all of the heavy lifting.
Setting Up a Federated Location
Microsoft has provided a very easy method for adding Federated Locations to your MOSS and MSS/X installation.
Through Central Administration, Click into your Shared Services Provider (SSP). On Search Server, you will be taken directly to Search Administration. In MOSS, you will need to manually navigate to that page. Once there, you should see "Federated Locations" in the Administration Bar (Quick Launch). You will see the page illustrated below:

Note: If you are using MOSS and do not have an Administration Bar in your Search Administration page, you do not have the Infrastructure Updates installed. Search Federation was added to MOSS by these updates (along with a lot of other improvements), and they must be installed before you can proceed. Read all about them on the Microsoft SharePoint Team Blog.
On this page, you can see some nice stats for the Federated Locations on your system. You can also import pre-created Location files, edit existing Locations, or create a new Federated Location. It is that last option that interests us today. When you click "New Location", you are presented with a very long form:
While there are a lot of fields, the main reason this form is so long is because of all of the "tutorial" information embedded in the descriptions. It is definitely worth a read. I've started filling it out in the screen shot above. As mentioned in the introduction to this article, I'm going to be creating a location for the Twitter micro-blogging/massively-multiuser-chat service.
Next I enter who I am, and the version of this Location:
I'm leaving the "Trigger" at its default of "Always". this is one of the places you can get really fancy with your definition, at least as far as determining when you want to actually invoke a query.
Next, we need to enter some information about what the target of your queries expects. In this case, we're going to tell the Federated Location to use the OpenSearch protocol, which sends your query terms as a URL parameter.

The Query Template lets you define the parameters your target, in this case Twitter Search, requires in order to return a result. I got this from Twitter's online API documentation. Since SharePoint and Search Server support Atom responses, that's the format I chose for Twitter to emit for its results.
The last thing I'll enter for this Federated Location is a link for "More Results". Again, the Twitter API documentation shows us that for "normal" results, we just omit the ".atom" from the URL. This parameter is optional, but very useful:
Note: While we aren't changing anything in the "Display Information" section at this time, this setting group will be very important to us in Part 2.
That's all there is to it! Click OK to save your new Federated Location, and it will appear in the list on the Manage Federated Locations page:
Using your Federated Location
Now that you have created your Federated Location, you need to add it to a Search Results page. The easiest way to do that, is to go to your Search Center, enter a query, and once you have the results, select "Edit Page" from the Site Actions menu. Click "Add a Web Part" in the banner of a Web Part zone. In the dialog that appears, select the Federated Results web part and click Add.
This will add a new Federated Results part to your page, but it probably won't be displaying the Twitter results. You now need to edit the part to point at the Federated Location you want.
- From the Edit menu of the web part, select Modify Shared Web Part
- In the Location Properties section, select "Basic Twitter Results"
- Click the "Apply" button.
You should now see results similar to the following:
Exit Edit mode on your page, and you're done!
You can download this version of the Twitter Federated Location file here.