Federating search results from other locations (Office SharePoint Server)
Updated: July 31, 2008
Applies To: Office SharePoint Server 2007
Unless otherwise noted, the information in this article applies to Microsoft Office SharePoint Server 2007 with the Infrastructure Update for Microsoft Office Servers.
A federated search is the simultaneous querying of multiple online databases (locations) for the purpose of generating a single search results page for end users.
When you add a federated location to Office SharePoint Server 2007, end users can search for and retrieve content that has not been crawled by your server. Federated locations allow queries to be sent to remote search engines and feeds, after which Office SharePoint Server 2007 formats and renders the results to your end users as part of your crawled content.
This article provides an overview of getting started with federated locations in Office SharePoint Server 2007 — administrator tasks, supported technologies, and security considerations.
In this article
Overview of federated locations
If a specific site is not crawled by an index server in your server farm directly, you can add it as a federated location and include its search results for users of the Search Center site.
Office SharePoint Server 2007 supports the following types of federated locations:
Search index on this server
You can use any local or remote site in your organization that has a server that is running Office SharePoint Server 2007 as a federated location. For example, imagine that a SharePoint site on a Human Resources server in your company is the only available source of employee contact information. Even if the site is not part of your crawl scope, you can configure a federated location for it so that users who initiate a search from your Search Center site can retrieve employee contact information results.
OpenSearch 1.0 or 1.1
You can use any public Web site that supports the OpenSearch standard as a federated location. An example of such a location is an Internet search engine such as Live Search, or a search results page that supports RSS or Atom protocols. For example, imagine that you want users who search your internal sites for proprietary technical research to also see related research information from public Web sites. By configuring a federated location for a Live Search query, up-to-the-minute Web search results will be automatically included for your users.
When a search query is sent to a federated location, it is sent as URL parameters in a format called a query template. Office SharePoint Server then formats and renders the results as XML for users of the Search Center site. The XML is displayed in a Web Part on the search results page as readable text.
You can add and configure Web Parts on the search results page as either a Federated Search Results Web Part or a Top Federated Results Web Part. By default, the search results page contains three Federated Search Results Web Parts.
To display federated search results on a page other than the default search results page, simply add a Federated Search Results Web Part or a Top Federated Results Web Part to the page on which you want to display the federated search results.
By editing the properties and Extensible Stylesheet Language (XSL) code of a federated location, you can control aspects of its search results, such as the metadata that will be shown or the number of links that will be displayed. You can also control the appearance of the search results, such as the color or font style of the link text. If you use trigger rules, you can modify the query that is sent to the federated location when a user types a specific prefix or pattern.
Using federated locations with the Search Index on this Server option
When adding local index federated locations to Office SharePoint Server 2007, the following conditions apply:
The location is set to Search Index on this Server.
No query template is required. Office SharePoint Server 2007 uses the object model to query a location.
Default server authentication is used.
Advanced search queries are not supported.
Federated locations for remote search indexes are configured in the same way as for a location that is based on OpenSearch, by using the remote server's RSS feed.
Using federated locations with OpenSearch
When adding federated locations that are based on OpenSearch to Office SharePoint Server 2007, the following conditions apply:
Queries can be sent to a search engine as a URL, such as http://www.example.com/search.aspx?q=TEST.
Search results are returned in RSS, Atom, or another structured XML format.
Office SharePoint Server 2007 does not support HTML or XHTML.
Location capabilities, query templates, and response elements are part of a Federated Location Definition (.fld) file that is associated with the location.
Extensions to OpenSearch that are specific to Office SharePoint Server 2007 support the ability to include triggers and the ability to associate XSL code with search results.
The choice of metadata to display in the search results is determined by the OpenSearch location.
For more information about OpenSearch, visit http://www.opensearch.org.
Deciding whether to use federated locations
Consider the following questions when determining whether you want to display federated search results to users:
Do you want to display custom results for particular searches?
To help ensure that the federated location returns results that match specific queries, you can use trigger rules. When you create a trigger rule for a federated location, the Web Part that is associated with that location displays results only for user queries that match the pattern or prefix that you specify. For example, let's say that you work at a company named Contoso, where employees and users of Office SharePoint Server 2007 manufacture a product commonly referred to as a widget. If you add a federated location for Live Search, you can create a trigger for the product name that will ensure that any search for "widget" consistently returns results for "Contoso widget."
Can you use a URL to specify which results to retrieve for a query?
To create a federated location, you need the query template, which is the combination of the URL and the parameters that are required to send a search query and return the results as XML. When you add this information to the Query template field on the Add Federated Location page, you must format the string correctly (as shown in the example on the page) or the federated location will not return any results.
Can users access the links that are provided by the federated location?
If your organization grants only limited access to Internet resources — for example, if your users can navigate only to your company's external Web site but not to other external sites — using an Internet search engine as a federated location might frustrate users because they won't be able to view some search results.
Is authentication required?
If the federated location requires authentication, you must provide the correct credentials. Credentials are required only for SharePoint sites. Most federated locations, such as Internet search engines, do not require credentials. For more information, see Security considerations for federated locations later in this article.
Managing federated locations
To get started with federated locations, click Federated Locations on the Search Administration page. On the Manage Federated Locations page, you can do any of the following:
Add or import a federated location
You can create a new federated location by entering its settings and properties on the Add Federated Location page, or you can start by importing an existing Federated Location Definition (.fld) file. You can download definition files by clicking the Online Gallery link on the Manage Federated Locations page. For more information about importing definition files, see Downloading location definition files later in this article.
Edit a federated location
You can edit a federated location by pointing to the name of the location on the Manage Federated Locations page, clicking the arrow that appears, and then clicking Edit Location. On the Edit Federated Location page, you can modify the properties and metadata for the location, such as how search results are displayed or whether to add trigger rules that return results only when user queries match a specific pattern or prefix. You can also modify the XSL code in the Federated Search Results Display Metadata section or the Top Federated Results Display Metadata section to change the formatting of elements, such as the title or links in the Federated Search Results Web Part or the Top Federated Results Web Part.
Copy a federated location
You can copy a federated location by pointing to the name of the location on the Manage Federated Locations page, clicking the arrow that appears, and then clicking Copy Location.
Delete a federated location
If you no longer want to use a federated location, you can remove it from your Office SharePoint Server site by pointing to the name of the location on the Manage Federated Locations page, clicking the arrow that appears, and then clicking Delete Location. If the federated search results page still refers to a location that has been deleted, the page will no longer include any results for that location.
You can stop displaying search results from a federated location without deleting it from the server. To do this, either delete the Web Part that you configured to display results from that location, or modify the properties for the Web Part to display search results for another federated location.
Export a federated location
You can save the properties and metadata for your federated location by exporting them as a Federated Location Definition (.fld) file. You can export a federated location by pointing to the name of the location on the Manage Federated Locations page, clicking the arrow that appears, and then clicking Export Location. After you export a definition file, you can import it to another Search Center site or place it on a file share for others to use.
When exporting a federated location to a definition file, Office SharePoint Server does not include your security credentials or settings with the file.
View federated location details
When you have added one or more federated locations to Office SharePoint Server, the Manage Federated Locations page automatically reports the number of user queries and clickthroughs that have been registered for all listed locations during the past 30 days. Administrators should be aware that certain search results from federated locations might never be clicked. For example, the phone number that is displayed in response to a query of "John Smith phone number" might result in the user dialing the phone number manually instead of clicking a hyperlink on the search results page.
You might occasionally encounter problems with a federated location, such as search results not appearing or taking a long time to appear. When you notice issues such as these, you can take steps to repair the federated location. More information about troubleshooting federated locations is available in the article "Repair federated locations" on Office SharePoint Server 2007 on TechNet (http://go.microsoft.com/fwlink/?LinkID=84739).
Downloading location definition files
The Office SharePoint Server 2007 Online Gallery has several Federated Location Definition (.fld) files that are available for download. You can access this site by clicking the Online Gallery link on the Manage Federated Locations page. After you have downloaded a definition file, save it to your hard drive, and then use the Import Location button on the Manage Federated Locations page to add the location to your site. After the location appears in the list, you can edit its settings and customize its properties.
When you create a federated location by importing a definition file, the XSL code that determines how the search results are formatted and displayed is already created for you. If you create a custom location by manually typing the properties and metadata in the Add Federated Location page, and you want to change the default appearance of the search results, you must know how to edit the XSL code for the federated location. After you configure a federated location for your site, you can also export it to be used as a federated location in another Search Center site.
Security considerations for federated locations
Depending on the location type that you specified when creating or modifying a federated location, your federated location may require authentication. As a result, you must specify the authentication method that should be used.
If Search Index on this Server is selected as the Location Type of the federated location, no additional authentication information is required. Users who can access the search results page will automatically see results from the federated location based on their credentials. However, if OpenSearch 1.0/1.1 is selected as the location type for a federated location, you must specify how to authenticate security credentials for that location.
Federated search locations configured for OpenSearch 1.0 or 1.1 can be authenticated in any of the following ways:
Grants everyone in your organization access to federated search results in the associated location without authentication of any account credentials. To select this option, click Anonymous: This location does not require authentication in the Specify Credentials section on the Add Federated Location page or Edit Federated Location page.
Grants everyone in your organization a single user name and password that are used to display federated search results in the associated location. To enable this option, click the authentication option that you want under Common in the Specify Credentials section on the Add Federated Location or Edit Federated Location pages.
Authenticates individual user credentials to display federated search results in the associated location. To enable this option, click the authentication option that you want under User in the Specify Credentials section on the Add Federated Location page or the Edit Federated Location page.
Although Office SharePoint Server 2007 does not provide a user interface for capturing single-user account authentication credentials, it does provide APIs for validating credentials from a custom user interface.
Modifying Web Part properties for federated locations
All search results for federated locations are displayed by using two types of Web Parts: the Federated Search Results Web Part and the Top Federated Results Web Part. Before you can display search results from a federated location, you must click the name of the federated location in the Location list of the tool pane for the Web Part.
On the search results page, on the Site Actions menu, click Edit Page. Click Edit on the Web Part menu, and then click Modify Shared Web Part to open the tool pane.
You can change the following properties, which are available in the Federated Search Results Web Part and the Top Federated Results Web Part:
Specify the name of the federated location or locations.
Specify the number of results to display per page, whether to limit the number of characters in the summary text or the URL that is displayed, and whether to use Location Visualization settings. In the properties of the Federated Search Results Web Part, you can additionally specify whether to display an animated graphic to indicate that the image is still loading, or whether to return results asynchronously rather than waiting to load the entire page.
Results Query Options
Specify whether to remove duplicate results, whether to enable search term stemming, and whether to ignore noise words.
More Results Link
Specify whether to show a More Results link, and what the text of the link should be.
In addition to the unique properties for federation Web Parts, all Web Parts share a common set of properties that control their appearance, layout, and advanced characteristics. You can view and modify these properties in federation Web Parts in the same ways that you can for any non-federation Web Parts. For more information about using common property settings, see "Customize Web Parts" in the Microsoft Windows SharePoint Services Help.