Leveraging and Optimizing Search in SharePoint 2010 : Federating Search

2/15/2011 9:03:41 AM
Sometimes you cannot or do not want to use the SharePoint 2010 search engine for some content sources but still want to return search results from that content. For this scenario, you can consume search results from a federated source.

Federation can be configured from locations that are OpenSearch 1.0/1.1-compatible and can return with RSS or Atom of the result set.

The following is a list of circumstances when federation needs to be used:

  • The content source is huge, and you don’t want to build your own index of it (for example, MSDN, or Wikipedia sites).

  • The content in the source changes often, and you need immediate crawling instead of SharePoint’s scheduled crawling.

  • The queries have to be processed under a different security context.

  • You need only the results with specific keywords or keyword patterns in the query.

  • The content is queried infrequently.

  • You have more than 500 content sources.

The following list contains the cases when federation should be not used:

  • There is not enough bandwidth between the SharePoint farm and the federated location.

  • Content changes often, but immediately crawling is not needed.

  • The content is not or cannot be crawled by the remote search engine.

  • The remote server does not return with RSS or Atom.

In most cases, the federated location is some external search engine. However, if SharePoint can crawl the content, but you have other specific requirements (for example, keyword restrictions or different security context), SharePoint can be its own federated location as well.

Federated locations can be defined on the admin page of the search service application, by performing the following steps:

Go to the administration page of the search service application.

Click on Federated Locations in the group Queries and Results of the left navigation bar.

Click New Location.

Fill in the basic properties: Location Name, Display Name, and Description. Author and Version are optional.

Trigger is the field where you can configure when this federated location has to be searched. The trigger types are the following:

  • Always— Query should always match.

  • Prefix— Query must begin with a specified prefix. For example, if you use the prefix SharePoint, and the query is SharePoint ECM, the federated location will be queried with the term ECM. If the query is ECM, the federated location will not be queried because the prefix SharePoint is missing.

  • Pattern— Query must match a specific pattern or a .NET regular expression capture group. For example, use the pattern (^([\w-\.]+)@([\w-]+\.)+([a-zA-Z]{2,4})$) for matching email addresses.

Select the Location Type. Use SharePoint Index on This Server if you want to use the local SharePoint index. FAST Index also can be selected for the results of a FAST Search Server. Select OpenSearch 1.0/1.1 to use remote federated location.

Configure the Query template. In this expression, the federated location’s query URL TEMPLATE can be configured. {searchTerms} means the query term that is passed to the remote search engine. For example, in case of using Bing as a remote search engine, the Query Template looks like this: http://www.bing.com/search?q={searchTerms}&format=rss

The More Results link template links to the URL that will be opened when the users click on the More Results link of the federated result set. It can be the same as the Query Template, but it’s not necessary.

The display formatting can be configured as XSL transformations. The result sets are in XML format so that these XSLs can define how to display them. Feel free to change it or use the default one.

Define usage restrictions, if you want to define what site domains can use this location.

Federated locations can be accessed with specific credentials different from the default one. Various types of credentials can be configured as follows:

  • Anonymous

  • Common authentication should be used when all queries have to be run with the same credentials. The types of common authentication are the following:

    • Basic Authentication

    • Digest Authentication

    • NTLM—Application Pool Identity

    • NTML—Username and password

    • Form Authentication

    • Cookie Authentication

  • User authentication also can be used if you don’t have common credentials for the whole company but would like to authenticate each user with a unique account. The types of user authentication are the following; in each case, the user has to be authenticated before using the federated location:

    • Kerberos

    • Basic Authentication

    • Digest Authentication

    • NTLM—Username and password

    • Form authentication

    • Cookie authentication

Table 1 describes the advantages and disadvantages of search federation.

Table 1. The Advantages and Disadvantages of Search Federation in SharePoint 2010
Federation conserves resources of crawling and indexing.There is no ability to configure ranking in federated result sets.
Federated locations can include content that cannot be crawled by SharePoint Search Engine.There is no ability to control which results appear in the federated result set.
Federation can provide the latest information from different content sources.The results cannot be scoped.

The results of various federated locations cannot be combined into a single result set.

The more result set web part is on the same page, which increases the time to load.

Federated locations also can be exported and imported. The steps of exporting a location follow:

Go to the admin page of your Search Service Location, and choose Federated Locations from the display group Queries and Results in the left navigation bar.

Here you can find the configured federated locations. Choose the one you want to export, and open its context menu.

Click Export Location.

The location definition will be generated in .OSDX format. Choose a place to save it.

The steps for importing an .OSDX definition file are as follows:

Go to the admin page of your Search Service Location, and choose Federated Locations from the display group Queries and Results in the left navigation bar.

Click Import Location.

Enter or browse the full path to the .OSDX file, and click OK.

After a successful import, you can edit the newly created location by choosing the option Edit Location, or finish the importing by clicking on Done.


The exported federated locations are not only able to be imported as a SharePoint 2010 federated location, but they can be also used in Windows 7. If you save the .OSDX file to your local computer and click it, Windows 7 offers to add this search connector to your client machine. This is the easiest way to use the SharePoint search engine or any other federated location on the client side.

  •  Leveraging and Optimizing Search in SharePoint 2010 : Search Scopes
  •  Active Directory Domain Services 2008 : View Cached Credentials on a Read-Only Domain Controller
  •  Active Directory Domain Services 2008 : Remove a User, Group, or Computer from the Password Replication Policy
  •  Active Directory Domain Services 2008 : Add a User, Group, or Computer to the Password Replication Policy
  •  Exchange Server 2010 : Backing Up Specific Windows Services
  •  Create Bookmark Create Note or Tag Backing Up Windows Server 2008 and Exchange Server 2010
  •  What to Back Up on Exchange Servers 2010
  •  Leveraging and Optimizing Search in SharePoint 2010 : Define Content Sources
  •  Deploying a Native SharePoint 2010 Search Service Application
  •  Backing Up the Exchange Server 2010 Environment : Roles and Responsibilities & Developing a Backup Strategy
  •  Backing Up the Exchange Server 2010 Environment : Supporting Backups with Documentation
  •  Backing Up the Exchange Server 2010 Environment : Understanding the Importance of Backups & Establishing Service Level Agreements
  •  Making the Best Use of SAN/NAS Disks with Exchange Server 2010
  •  Optimizing an Exchange Server 2010 Environment - Properly Sizing Exchange Server 2010
  •  Optimizing an Exchange Server 2010 Environment - Analyzing and Monitoring Core Elements
  •  SharePoint 2010 : Beyond Built-In SharePoint PowerShell Cmdlets
  •  SharePoint 2010 : Understanding Advanced PowerShell Topics
  •  Optimizing an Exchange Server 2010 Environment : Monitoring Exchange Server 2010
  •  Optimizing Exchange Server 2010 Servers
  •  Business Intelligence in SharePoint 2010 with Business Connectivity Services : Consuming External Content Types (part 3) - Business Connectivity Services Web Parts
    Top 10
    Pure Sensia 200D - Nice Wireless Speaker
    AOC E2343FI – It Isn’t Just Incredibly Slim
    HP Anti-glare Compaq LCD
    Philips C-Line 249C4QH - Lacking In Features And Adjustability
    Wonderful Accessories For Your Life
    Xyfi Wi-Fi And 3G Router
    All About Nexus 7 (Part 5)
    All About Nexus 7 (Part 4)
    All About Nexus 7 (Part 3)
    All About Nexus 7 (Part 2)
    Most View
    Integrating Exchange 2010 with SharePoint 2010
    Managing Local Logon
    Programming with DirectX : Textures in Direct3D 10 (part 2)
    Create And Share Your First Photo Journal
    WD My Book Thunderbolt Duo 4TB
    Windows Server 2008 : Install the Hyper-V Role
    Windows Tips & Tricks (August 2012) – Part 2 - Manage Your Google Docs Offline with gExplore
    SQL Server 2008 : Service Broker Defined
    SQL Server 2008 : General T-SQL Coding Recommendations (part 1) - Provide Explicit Column Lists & Qualify Object Names with a Schema Name
    HTC One X
    The Hot Five Stuffs For October 2012 : Sony Xperia T, BMW C Evolution, Philips FWP3200 Mini Hi-Fi, Oculus Rift VR Headset, Lego 4x4 Crawler
    Windows 7 : Working with Multiple Local Group Policy Objects
    SharePoint 2010 : SharePoint Fundamentals (part 2) - Site Templates
    Windows 7 : Working with the Windows Firewall (part 1) - Windows Firewall Features and Improvements
    Bridge Camera – A Complete Buyer's Guide! (Part 3)
    The 50 Best Headphones You Can Buy (Part 3)
    Maintaining and Optimizing Windows Vista Systems : Memory Usage and the Paging File
    Biggest tips guide ever! (Part 1)
    A Feature Release : Mountain Lion offers evolution, not revolution?
    Database Availability Group Replication in Exchange Server 2010 : Comparing and Contrasting DAG Versus CCR/SCR/SCC