Posted by . (0 comments)

Task

Show search results from a WordPress blog next to SharePoint search results.


Prerequisites

One of the following enterprise search products:

  • Microsoft Search Server 2010 Express
  • Microsoft Search Server 2010
  • Microsoft SharePoint Server 2010
  • Microsoft FAST Search for SharePoint 2010
  • Also works with Microsoft Office SharePoint Server (MOSS 2007) and Microsoft Search Server 2008 (Express)

WordPress (cloud or on-premise)

How it works

SharePoint can integrate WordPress search with the help of a Federated Search Connector, a XML based definition of how to pass a query to a target system and accept and display results from that system.

In older versions Microsoft used .fld (federated location definition, an extension to OpenSearch 1.1 draft 3) since SharePoint 2010 Microsoft uses .osdx (OpenSearch description document 1.1 draft 5).

If you do not have such a definition file for the system you want to integrate, you can create a definition via the SharePoint Search Administration user interface in your browser. Which is what we will use in this example.

A nice side effect: As it is a open standard, it also works with other search tools, like the desktop search in Windows 7 or the search box in Mozilla Firefox. So afterwards you can export your new definition and re-use it.

Recommended read:

Now that you know how it works, let’s begin implementing it.

Configuration

Federated Search Location

Step 1: Prepare the search URL

  • Go to your blog, search for “Test” and copy the URL from the browser. In my example this gives: http://blog.christian-heindel.de/?s=Test
  • Now in the URL replace “s=Test” with “feed=rss2&s={searchTerms}“>
  • You should end up with sth. like: http://blog.christian-heindel.de?feed=rss2&s={searchTerms}

Step 2: Create a new federated location

  • Open the “Central Administration“, go to “Application Management > Service Applications > Manage service applications > Search Service Application
  • Now click “Queries and Results > Federated Locations > New Location
  • Under “Location Information > Location Type” select “OpenSearch 1.0/1.1
  • Now in the field “Query Template” fill in the prepared URL from step 1.

Search Web Parts

Step 3: Site Collection Feature

  • Under “Site Actions > Site Settings > Site collection features” be sure that “Search Server Web Parts” is “Active“.

Step 4: Edit Page, add Web Part

  • On the page where you want to show the search results, click on “Site Actions > Edit Page > Add a Web Part
  • Choose the “Federated Results” Web Part from the “Search” category

Step 5: Configure Web Parts

  • Now on the “Federated Results Web Part” click on “Edit Web Part“.
  • Unter “Federated Results > Location Properties > Location” select the federated location created in step 2 and click “OK“.

This were 5 simple steps to integrate WordPress search in SharePoint. Happy searching…

Want more?

Leave a Reply

  • (will not be published)