Among many features and improvements to the search engine, things brought by the Infrastructure Update, perhaps the most awaited one, search federation, was finally deployed.  With search federation the search results are no longer restricted to the site collection, webs, farms in other words, local search results.  On the same search result page using the same search query term the user will retrieve the results from both the index as well as external search engines. 

But this doesn't mean that you should use  federation ONLY  for the external sites.

As you learn from this blog: http://blogs.technet.com/tothesharepoint/archive/2008/07/18/3090988.aspx federation has it's very well thought place in geo distributed environments, where multiple users from different parts of the globe using services from different SharePoint farms needs to search across multiple farms instead of just their own.

So, how how does one set this up?

First of all the let's assume you have to a server farms , farm A and farm B.  The users accessing these farms reside in the same forest, so the permissions should not be an issue.

You want the users from the farm eight knots to receive only the results from farm A index but also from Farm B ‘s index.  Not to mention you don't want to index the same content twice, so you would set up a Federated connection on farm A to retrieve search results from farm B’s index.

Step one:

Farm A's central administration, SSP settings, let's create a new federation location connector:

Go to your Federated locations page and click on the new location button, type in the location name, display name and the description as you would like to have them.  Scroll down until you reach the location type.

Choose  OpenSearch 1.0/1.1

Now it's time to specify the query template, as you might be accustomed from Internet explorer methods on setting custom search provider's we need to specify an URL, a parameter and the query string.  Four this we should go to farm B search results page, usually something like :

http://… /SearchCenter/Pages/results.aspx?k=TEST

In Internet explorer custom search provider settings you would have had to copy this URL and simply put it in, but in SharePoint, the Federated location should have an XML formatted resultset of the search results, therefore to obtain these , click on the RSS feed button in Internet explorer when you have the search results displayed.  You will get a page who’s URL looks similar to this:

http://…/SearchCenter/_layouts/srchrss.aspx?k=TEST

It's easy to notice the keywords test in the second URL(as parameter), copy this URL paste it into your Federated location query template field and the replace TEST with {searchTerms}

A special notes to this : for it to work, the curly brackets and the capitalization on searchTerms keyword should be exactly as here small “s” capital “T”.

In the end, your query template URL would look something like this:

http://…/SearchCenter/_layouts/srchrss.aspx?k={searchTerms}

Now scroll down to complete to the more results link template,which will be in fact the actual results page from the farm B server, of course parameterized  to our search terms

http://…/SearchCenter/Pages/Results.aspx?k={searchTerms}

All you need to do now is a scroll even further down to specify the credentials that would be passed on to the new server search service.  If your users reside in the same forest across multiple domains you can simply specify the credentials :

User:

Kerberos Integrated

Which would mean that each time a user logged on to your server in farm A will query the search service in farm B his credentials will be passed on to the farm B search server, allowing for the security trimming of the results to occur.

Click OK and the location should be set .

All that it's left to do is to go to your search results page in a server A and add a federated location web part that will consume the Federated location we just defined here.