Archive for month: February, 2012

FAST: Open Library/Location in FAST for SharePoint search results

20 Feb 2012
February 20, 2012

Recently I read a blog post how to customize the core result webpart – thats the webpart showing the results after you do a search with SharePoint 2010. The the output was modified so that you can click on a link to open the library/folder containing the document you searched – quite handy in my eyes.

SharePoint Search

The solution for SharePoint search is quite easy, just add

and you are good to go (more details in the mentioned blog post).

The Problem

If you are doing the same thing with FAST for SharePoint (FS4SP) it does not work. The propertysitename is not filled with the location of the document, the FAST crawler extracts, what it should – the sitename.

The Solution

So I started up Visual Studio, copied the xslt and the search result xml and created a little xslt function to extract the path to a document and to show a link:

In the xstl search for the comment “<!– END Additional links –>” – add my code after the closing </div>, thats arround row number 655.

Then add the template “build-location-link” close to the end of the xslt. I added mine right before the comment “<!– End of Stylesheet –>”. That should be line number 968.

The result should look like this:

In my eyes the xslt is not the most elegant solution (any way to remove the recursion with xslt?) – but – I tested it in several installations now – the users loves it!

If you have trouble copy/paste all out of this file: FAST Open Library XSLT.

Further improvements?

So how did you modify the search results – any modifications worth to share?

 

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close