Configuring Federated Search to display results from your Corporate Web Site

Posted Wednesday, November 11, 2009 1:16 PM by CoreyRoth

Last weekend, I gave my introduction to Enterprise Search talk where I showed the basics of using search.  One of the topics I covered is how to use federated search to display results from an external web site.  I’ve seen this topic come up in the forums as well, so I thought I would write something up on it.  Typically when people do this is they have federated results from their public facing corporate web site display along side the results from a regular search on the SharePoint farm.  Everything we are doing today can be done without writing any code.

For today’s demonstration, we will pretend DotNetMafia.com is a corporate web site and federate results from it.  When the user executes a document search on my SharePoint site, we will show those results as well as results from DotNetMafia.com that match the user’s keyword query.  To be able to show results from the corporate web site, we will need these results available in a search index.  For today, we will index DotNetMafia.com on the same search server, but this could also be an external server as well.  You can use anything that returns an RSS feed of results following the Open Search 1.0 / 1.1 standard.  Since, we are using the same server, we will just create a new content source to index our corporate web site.  I specify the URL of the start address and then I start a full crawl on this content source.

SearchContentSourceDotNetMafia

The next thing I need is to create a scope for my corporate web site.  This will allow us to easily filter the results later so that we can get results from just DotNetMafia.com.  This scope will just have one rule which uses the DotNetMafia.com content source.  We’ll call my scope DotNetMafia.

SearchScopeDotNetMafia

At this point we are ready to create our new federated location to display the results of our corporate web site.  Click on the Federated Locations link on your search administration page.  At this point, it’s probably good to remind you that Federated Locations is only there if you are running the Infrastructure Update (or later) or Search Server.  This is pretty easy to do because we can start with the Local Search Results federated location and make a copy of it.  We can use a copy of the Local Search Results location because in my case the index is running on the same server.  If you are going against an external search server, it’s also pretty simple, you just have to know the URL to get the search results from.

SearchFederatedLocationsCopy

Once you have made your copy, edit your new location.  You will need to specify a name.  In my case I just went with DotNetMafia.  You can set this as you see fit.  Most of the other values you do not need to change, until you get to the Location Information section.  Here you will choose, Search Index on this Server for the Location Type.  We now need to change the Query Template to include the scope that you created earlier.  The query template passes what the user search for in the {searchTerms} token.  We can simply make use of the keyword query syntax here and append a Scope keyword like shown below.

{searchTerms} Scope:”DotNetMafia”

Specify the name of your scope in quotes.  We also need to add Scope:”DotNetMafia” to the “More Results” Link Template.  Here is what both of those changes look like after you have changed them.

SearchFederatedLocationDotNetMafia

These are the only fields that you need to change to get started.  Once you save your new federated location, we are ready to configure this on your search center results page.  I am assuming today that you already have an existing search center site.  If not, go create one.  Then go to your results.aspx page and edit it.  You may or may not have a federated results web part(s) already on this page.  If you don’t have one, click on the Right Zone and add a new web part and choose it from the list.  If you have an existing Federated Results web part, you may change your existing one if you don’t want to search bing any more.  You can also add another one to display multiple federated results at the same time.  Here is what one looks like.

SearchResultsFederatedResultsEditMode

Whether you use an existing Federated Results web part or a new one, you will want to configure it to use your new federated location.  Under Location Properties, choose the name of your Federated Location from the dropdown list.  Click ok, and publish your results page.

SearchFederatedResultsWebPartProperties

You can now try out your new federated search.  In my case I am searching my local SharePoint server for the keyword Accounting.  It will also return any results that match that keyword from DotNetMafia.com.  Here is what those results look like.

SearchFederatedResults

This is a simple way to quickly give your users results from multiple sources at once.  It requires very little configuration and no code at all.  It’s easy to test out, so try it out on your own SharePoint farm and see how your users like it.

Comments

# Twitter Trackbacks for Configuring Federated Search to display results from your Corporate Web Site - Corey Roth - DotNetMafia.com - [dotnetmafia.com] on Topsy.com

Pingback from  Twitter Trackbacks for                 Configuring Federated Search to display results from your Corporate Web Site - Corey Roth - DotNetMafia.com -         [dotnetmafia.com]        on Topsy.com

# re: Configuring Federated Search to display results from your Corporate Web Site

Friday, November 13, 2009 12:14 PM by tony

Great post, good info, clear and simple.  

# re: Configuring Federated Search to display results from your Corporate Web Site

Tuesday, December 22, 2009 11:09 AM by Manish

Thanks for useful information. Check also how to create locations to show top news from google using federated search @ manish-sharepoint.blogspot.com/.../federated-search-in-sharepoint-2010_21.html

# re: Configuring Federated Search to display results from your Corporate Web Site

Wednesday, December 1, 2010 4:46 PM by Umar

Nice.. Great Post. Wonder if it’s  possible to show results from SharePoint search site from different  farm in to new SharePoint farm using fed location url . How can one create a url that can be pasted in to the fed location and see result in new farm.

# re: Configuring Federated Search to display results from your Corporate Web Site

Monday, December 6, 2010 2:51 PM by CoreyRoth

@Umar Yes, you can federate to other farms just by using the RSS link.  Just do a search on your farm and note the URL that the RSS link uses.  Follow the steps in this post to set up a federated location with that URL.

# re: Configuring Federated Search to display results from your Corporate Web Site

Friday, December 10, 2010 11:52 AM by Shaun

Great Post - Just the information I needed.

# re: Configuring Federated Search to display results from your Corporate Web Site

Saturday, August 27, 2011 2:06 AM by Sandeep Soni

Nice...I am looking for it.

Leave a Comment

(required) 
(required) 
(optional)
(required)