ArchivesNeil on SharePoint of

Missing document icons from search results with FAST for SharePoint

There’s a defect whereby your search results in SharePoint will not have document icons if you’re using FAST for SharePoint.

This will happen to you, whenever you’re using a Document Library created from a custom Document Library template (i.e. Type != 101).

Why this happens

The problem is that the contentclass of documents from custom libraries indexed by FAST in is not compatible with the way the Core Results Web Part determines which icon to display. Under normal circumstances, FAST allocates documents a contentclass of STS_ListItem_DocumentLibrary and when search results are returned to the Core Results Web Part as an xml document, our document is accompanied by an imageurl element which points to an icon within the layouts folder (i.e.  /_layouts/images/icdocx.png).

When using a custom document library, let’s say with a type of 15000, the contentclass will be STS_ListItem_15000 and the Core Results Web Part will be returned an imageurl element of /_layouts/images/STS_ListItem16.gif.

This has been accepted as a bug by the product team. Unfortunately, So far as I know, it is not likely to be resolved in either upcoming hotfixes or Service Pack 1 (I have no visibility of any future CUs or Service Packs). The Microsoft-recommended workaround is to create a Custom Pipeline Extension whereby library items that have a contentclass of STS_ListIem_<a number> are converted to STS_ListItem_DocumentLibrary.

I’m checking into whether I can post some PSS-provided sample code for the pipeline extension, but until then, visit this page on MSDN to get instructions on how to create one.

Update 21 Sept 2012:  Baastian Kortenbout has provided code which addresses the issue. This can be downloaded here: FS4SP2010PipeLineExtensionIconFixer. I make no guarantees about the code, you assume all risks and responsibility should you chose to use it in any way, blah blah blah.


By admin on May 7, 2011 | FAST, Sharepoint | 4 comments