Tag Archives: Sharepoint

Clear FAST Search Content Collection

I had a stubborn FAST Server installation that continued to return search results, even after the content source was removed from FAST!

After stumbling around, someone on the FAST forums at Microsoft suggested clearing the sp collection, but didn’t say how.

Here’s how:

On the fast server, there will be a shortcut to launch a FAST powershell prompt – open that

Enter the command

Clear-FastSearchContentCollection sp

That should clear it out – you’ll need to do full crawls on all your content sources after this is done to repopulate the index, so it’s best not to do this to a production box without understanding how long search will be down.

Also note that in FAST Search for Sharepoint, pretty much everything is stored in the SP collection – It’s my understanding that as of right now, you can only have one collection in FAST for SP.

Snippet of XSLT to create a link to the parent folder of an item in a search result

I wanted to add a link to the parent folder of an item in FAST search results.

I had found an article that said I could use the “SiteName” property.

Unfortunately, this content wasn’t from a SharePoint site, it was from a File Share.

The “SiteName” only returned \\Server\Sharename for each result, never the folder path

For example \\Server\ShareFolder1\SubFolderA\myfile.txt is where the file is

SiteName retured \\ServerShare

I wanted \\Server\Share\Folder1\SubFolderA

The following XSLT uses a few chained string commands to return the desired results

<xsl:if test="isdocument = 'True'">
      <xsl:attribute name="href">
         <xsl:value-of select="substring(url,1,string-length(url) - string-length(title))"/>
      <i>Link to Containing Folder</i>

Snippet of XLST to dump the output of search results

This is one of those posts more to serve as a reminder to me than anything.

While watching a video on SharePoint-Videos.com about customizing search results with XSLT, the presenter showed how to use a small bit of XSL to dump all the search results returned by the search engine – the original video can be found here: http://www.sharepoint-videos.com/sp10-customize-search-results-using-xslt/


<?xml version=”1.0″ encoding=”UTF-8″>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xls:template match "/">
<textarea rows="20" cols="100">
 <xsl:copy-of select="*"/>