SharePoint 2010 adds a new feature set of components called the Federation Object Model. This object model provides the ability to manage the configuration, querying and rendering of search results. The entire Federation OM consists of three core components:
With the three out of the box Federation Locations types, under certain circumstances it may be necessary to create your own custom federation location run-time. The following scenarios would be possible candidates for creating a custom Federation Location run-time.
Creating a Custom Federation Location for SharePoint 2010 Search is overall not that hard. The things to remember are to implement the correct interfaces and created the Open Search Definition File (OSDX). In the example below I created a simple federation run-time that will query a SQL Server Database.
String connUrl = this.Location.MappedQueryTemplateUrl
<All_Results><Results><Result>...</Result><Result>...</Result></Results></All_Results>
That is all there is to it. I included a sample OSDX and C# class file that you can use as a guide.