Using FAST ESP with MOSS 2007


In January 2008 Microsoft announced the acquisition of the company Fast Search & Transfer (FAST) . FAST is a leading provider of enterprise search solutions. Since FAST is a Norwegian based company (and continues to be a subsidiary of Microsoft based in Norway), it was of course very exiting. Many of our customers already use FAST as their enterprise search solution in addition to SharePoint.

I’ve been playing around with the FAST ESP Web parts lately. FAST ESP is an advanced product and we will of course learn more about the actual product as the acquisition goes forward and the FAST products move on as new Microsoft solutions.

The figure below (taken from the FAST ESP Product Sheet) shows the architecture of the FAST ESP product:


The product-sheet can be found here:

One important note is that FAST ESP not only searches MOSS content, but can index a wide range of document types from other sources like web, file shares, custom applications, custom databases etc through an extensive set of connectors.

FAST ESP Web Parts

Although FAST ESP has an extensive API and web services interface, the easiest way of integrating FAST with MOSS 2007 is to use the web parts available. Fortunately, these web parts come for free, including the source code, as a CodePlex project.

The web parts can be found here:

The CodePlex project contains a set of installable web parts. All the web parts are bundled in a simple setup-program.

Note! From the comments on CodePlex, there seems to be some confusion about the prerequisites for using the web parts. You need the FAST ESP product to be able to use the web parts! FAST ESP is not free, and there is unfortunately no trial version of this product yet as far as I know. So, if you don’t have the FAST ESP product installed already, there’s no point installing these web parts.

The following web parts are available:

Name Description
ESP Breadcrumb Shows a breadcrumb trail containing you query and any navigators selected.
ESP Did you mean Shows spellchecking information. If you mistype, the web part will suggest a correction
ESP Navigator Shows a single navigator that is used to narrow down the search result. A navigator can be based on any field in the search result, for example document type, language, or date ranges
ESP Navigators Displays all navigators returned in the result set
ESP Result List Displays the actual search result
ESP Search Action Displays action links that can be performed on the result, for example sorting.
ESP Search Box The search box where you type your search keyword(s)
ESP Search Config A hidden web part that configures the search view and other search settings for use by the other web parts. The ESP Result list also contains the search config, so if you use this web part, you don’t need to add Search Config
ESP Search Pagination Displays paging information (1,2,3,4… and previous/next)
ESP Search Statistics Displays statistics about a particular query, for example “Results 1 - 8 of about 838. Your search took 0.0160 seconds.”

Installing the web parts

If you want to install the web parts, go to this page

Download the file. You will find the source code and two videos on the same page.

Installation is easy. Log on to you MOSS server with the Farm admin account and run Setup.exe


The installer will check for necessary prerequisites:


The setup will then ask which MOSS web applications you want to install the web parts feature to. After installing the web parts, you will see a new Site Collection Feature which you need to activate:


After activating the ESP Search Web Parts feature, you can edit a page and add the web parts.


To be able to perform a search, you need at least to add the Search Box and the Result List web parts. After adding the two web parts, the page looks like this:


The Result list web part will display its configuration information when the page is in edit mode. Now, to be able to perform queries against the ESP Query server (FAST ESP Server), you need to configure the connection string. The query string is set in the ESP Connection String property of the web part(s). The default value is “localhost:15100”.


Instead of setting this value on each separate web part, you can set this globally through the ESP Connection configuration page which is installed by the web part setup. This page can be found under Site Settings -> Site Collection Administration -> ESP Query Server Connections:


All web parts will read this value unless overridden in the web part settings.

When the connection string has been set using the web part property, you need to apply the changes to be able to select the Search view to use for the query. Search views are configured centrally in FAST ESP, and the list of all available search views will be presented in the web part:


After selecting the Search view, you configure any other settings, but none of these are necessary to change to be able to perform a query.

The search box web part will look like this:


And the result list:


The particular example above shows search results from a Meridio Document Management system using MOSS 2007 as the search front end.

Other web parts

In addition to the search box and result list web part shown above, the other web parts are very valuable in order to create a great search experience.

As long as you have the Result list web part on a page, you only need to add the other web parts to the page and they will use the current search configuration and context to present their output.


Obviously you will need the possibility to navigate through many results by paging through the result set. To do this you add the “ESP Search Pagination” web part. Just add it to the page on top of or below the Result List web part:


Search statistics

If you add the Search Statistics web part, you will be able to show statistics about the current query:


There are no particular settings for this web part except the usual XSL, Search Group and so on.

Did you mean

The “Did you mean” web part is helpful in correcting misspelling of query terms. If a user misspells a word, this web part can show a suggestion of the correct spelling for that word. This function depends on the spell-check settings of the search configuration. Initially spell-check is OFF.

To turn on spell-check, go to the settings for the Result List or Search config web part and change the “Suggest corrections” property:


Now, if you misspell a word, the web part will suggest the correct spelling and you can click the correct word to execute a new query:


Setting the corrections setting to “Apply corrections automatically” will perform the initial query with the corrected word automatically, and the result will look like this:



Navigators are a powerful feature of FAST ESP. It is mainly used for drilling down or restricting a large result set into a smaller result set (often called “Facets”, “Categories” or “Filters”). In fact, MOSS Search has no such web part.

The navigators are configured in the ESP administration (not through MOSS) and are based on default or custom search fields (metadata). There are two navigator web parts:

- ESP Navigator: Display one navigator

- ESP Navigators: Display all navigators

If you add the ESP Navigators web part, if will render the current navigators which is relevant (have any hits) for the current query:


The navigators summarize the result list into particular categories based on the different fields in the result, and count the number of hits for each value of that field.

If you click on one or more navigator value, this will apply the current filter on the search result to narrow the complete result list:


In this particular example I was only interested in English PDF documents, so I applied “Adobe PDF” as format and “en” as language. This reduced the number of results from 110 to 32.

If you click on the small “x” in front of the selected navigator values, you turn off that filter. The number of hits can be presented as a count or a percentage or both.

You can of course change the rendering of the navigators to your needs by modifying the XSL.

If you only want to display one particular navigator, you can use the ESP Navigator web part and select which navigator to display.

Customizing the design

The search results are returned from the ESP server as XML. All the web parts therefore uses XSL to render the actual HTML presented on the page. In order to change the output from the web part you will need to modify the default XSLT code to suit your particular needs.

As an example, I will edit the search result shown above a little bit by changing the XSL in the web part.

I will increase the size of the icon, change the title font to bold and let the text float to the right of the icon.

To do this, you would go to the web part properties and click on the XSL Editor Button:


This will open the editor:


The editor isn’t really a good editor, so it’s better to copy the whole text into another editor like Visual Studio to edit the xsl.

Find the code that renders the title of each search result:

<xsl:template match="Result" >

<xsl:variable name="id" select="id"/>

<xsl:variable name="url" select="url"/>

<span class="srch-Icon">

<a href="{$url}" id="{concat('CSR_IMG_',$id)}" title="{$url}">

<img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" width="75px" height="75px" style=”float:left;margin-right:15px” />



<span class="srch-Title">

<b> <a href="{$url}" id="{concat('CSR_',$id)}" title="{$url}">


<xsl:when test="hithighlightedproperties/HHTitle[. != '']">

<xsl:call-template name="HitHighlighting">

<xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />




<xsl:value-of select="title"/>



</a> </b>



The changes I made appear in red/bold in the XSL code above. Now, after saving the changes, the output will look like this:


As you can see, this is the same way you change the rendering of the MOSS Search result web part. You can also put the XSL code in an external file and use the XSL Link property to point to a file that can be used by several web part instances.

Most of the other web parts also use XSL to change the rendering of the output.


I haven’t been able to really test the quality of the web parts and all their functionality to the fullest yet, but I’m quite pleased with the experience so far. I’ve looked through the code and it looks quite solid.

However, I noticed a couple of minor issues when playing around with the web parts.

A notable issue is that storing the global connection string in the Search connections config page does not work properly. It tries to save the connections as a persistent object in the SharePoint config database.

I got the following error message when visiting the configuration page and in some web parts:

“EXECUTE permission denied on object 'proc_putObject', database 'SharePoint_Config'”

So it seems that storing the connection string requires more permission in the database. I suppose this would not happen if you use the administrator account as service accounts, however my setup was using a separate service accounts for the Farm admin and the application pools.

The quick solution to this “problem” was to download the source code and modify the code a bit so that the global connection-string was hard-coded. This way I could set the connection-string in the web parts instead of using the global connection-string. A better approach might be to use web.config to store the connection string(s).