Wednesday 26 October 2011

Display a Web Part as a Visual Best Bet in FAST Search Server 2010 for SharePoint



FAST Search Server 2010 for SharePoint has a number of nice visual enhancements you don’t get with regular SharePoint Server Search, such as document previews and visual best bets. This blog post provides a walkthrough of making use of Visual Best Bets to display a SharePoint Web Part.


How do Visual Best Bets work?


MOSS 2007 and SharePoint Server 2010 provide Best Bet functionality that lets you specify some HTML to display as a Best Bet. A FS4SP Visual Best Bet on the other hand lets you specify a URL, the web page for the URL is then displayed in a web part using an iFrame.


If I setup a Visual Best Bet for the keyword “SharePoint” and specify a document library as a Visual Best Bet I get this:



The document library displays in an iFrame above the search results. If we edit the page you can identify the web part that displays the Visual Best Bet.




There’s one useful property you can edit for the ‘Search Visual Best Bet’ web part. The very first web part property displayed for the web part is called iFrame Height.






The default for this is set to 150 pixels. You can edit this property to allow you to display your Visual Best Bet with a higher height, as an example if I increase this to 300, I get the following.




So that’s how Visual Best Bets work… so I’ve been thinking of the best way to make use of Visual Best Bets to display some truly awesome looking dynamic content.


Well SharePoint can display dynamic visually rich content can’t it?


Here’s a page displaying a video using the Media Web Part.






Here’s a page displaying an Indicator Details web part for a KPI in a status list.





Here’s a page with a chart web part.

Wouldn’t it be nice if we could display Web Parts as Visual Best Bets?


If we try that, if I create a keyword for “FAST Search” and use the video page as a Visual Best Bet I get this:



 The page chrome, ribbon, banner, navigation etc. is getting in the way – wouldn’t it be nice if we could just display the Media Web Part as a best bet?


This is possible in SharePoint, you can selectively hide what is rendered on a page using CSS. A quick way to remove a large amount of page chrome is to use the IsDlg=1 query string parameter. So where my Video Page URL is:


http://portal.sezai.com/Pages/FAST-Search-Video.aspx


If I edit the Visual Best Bet, and change the URL to this:


http://portal.sezai.com/Pages/FAST-Search-Video.aspx?IsDlg=1  



I get the following in search results:



Much better! IsDlg=1 is used by SharePoint when displaying popup dialogs, the query string parameter hides page chrome. We still have an issue regarding not all content being displayed. There are two options with this:


1) Reduce the web part height in the video page.


2) Increase the height of the iFrame for the Visual Best Bets Web Part in the search results page.


Both will work, If I go with option 2 – I get this:



That looks sweet, it is displaying an inactive scroll bar… but let’s just ignore that :)


If we do the same with the KPI Web Part page we get:




Here’s what the chart web part looks like:



So you can quite easily setup Visual Best Bets with FAST Search Server 2010 for SharePoint to show a visually stunning Web Part if you:


1. Create a page and add your desired web part to it.

2. Ensure the web part height is less than the Visual Best Bets web part height, by either reducing the height of the web part you want to display, of increasing the iFrame Height property on the Visual Best Bet web part on the search results page.

3. Create a Visual Best Bet to your web part page and add the ?IsDlg=1 query string parameter to the end of the URL.

With all of the various types of dynamic web parts you get with SharePoint, you now have no excuse for not making good use of Visual Best Bets in FAST Search Server 2010 for SharePoint.

Sunday 23 October 2011

Slide Deck from SharePoint Saturday Melbourne - Developing a Custom FAST Search Server 2010 for SharePoint Solution

I'm back home in Perth from SharePoint Saturday Melbourne. I had an awesome time in Melbourne, spent most of the time with my sister, brother in law and four neices.

My presentation on Developing a Custom FAST Search Server 2010 for SharePoint Solution went really well, I did an overview of my FAST Spatial Search Toolkit solution.

Slide deck below:

Sunday 16 October 2011

FAST Spatial Search Toolkit Installation


This post contains installation steps required to deploy the FAST Spatial Search Toolkit.

Execute the createspatialmanagedproperties.ps1 PowerShell script via the Microsoft FAST Search Server 2010 for SharePoint shell as a FAST Search administrator on a FAST Search Server.



This script will create six managed properties – north, south, east, west, latitude & longitude.

After these managed properties are created, you need to map data that either has longitude & latitude pairs stored as numeric or decimal values, or map data that has north, south, east & west bounds as numeric or decimal values. Spatial data must be based on WGS84 (http://en.wikipedia.org/wiki/World_Geodetic_System)




Ensure you run a full crawl after mapping your crawled properties to these managed properties.

Add the Sezai.FastSpatialSearchCenter.wsp farm solution to your farm (http://technet.microsoft.com/en-us/library/cc262995.aspx#DeployFarmSolutions) and deploy the solution to the web application where you want to create the FAST Spatial Search Center site.



Navigate to the site collection where you want to create the FAST Spatial Search Center.

Two Site Collection Features need to be activated before creating the site.

Activate FAST Spatial Search Center Layouts and FAST Spatial Search Web Parts.



Now create a new site based on the FAST Spatial Search Center template.



Before you can use the new FAST Spatial Search Center site, you need to enter your Bing Maps API Key in three different pages default.aspx, results.aspx and bigmap.aspx.



Edit default.aspx and edit the properties of the Bing Maps Silverlight Web Part. Expand the Other Settings attribute section and edit Custom Initialization Parameters. Replace YOURAPIKEY with your Bing Maps API Key.
Check in the page.



Ensure you then Publish the page.




Repeat this process on results.aspx and bigmap.aspx.



Download - FAST Spatial Search Toolkit


The FAST Spatial Search Toolkit v1.0 contains a custom site definition based on the FAST Search Center site definition and incorporates a Bing Maps Silverlight Control to provide spatial search.


For installation details check out: FAST Spatial Search Toolkit Installation

FAST Spatial Search Toolkit v1.0 - Search for Spatial Data with FAST Search Server 2010 for SharePoint


I've been working on a custom FAST Search Server 2010 for SharePoint Solution which is an extension to the FAST Search Center site template that allows you to search for data that is spatially referenced.

Many organisations deal with data that is spatially referenced, this solution provides the ability to search for data with FS4SP using a map control to zoom in on a specific piece area of interest so you can focus on finding data specific to that area.

For v1.0 of the FAST Spatial Search Toolkit I've developed a custom site definition based on the out-of-the-box FAST Search Center site definition. The FAST Spatial Search Center incorporates a custom Silverlight 4 application that uses the Bing Maps Silverlight Map Control to allow searches to be refined spatially and for visualisation of spatial search results.

The out-of-the-box default.aspx and results.aspx pages have been customised to incorporate a small map control for spatial filtering and visualisation. A large full screen map page is also included that queries FAST Search via the search web services for returning and visualising thousands of search results across an area.

Check out the following video for a demo of the solution:



The FAST Spatial Search Center supports searching for points and bounding boxes. Point data is represented by Longitude and Latitude coordinates and bounding box data has a North, South, East and West bound which represents an area.

If you would like to deploy and test the solution out yourself, you will need your own Bing Maps API key and will also need to create six FAST Search managed properties to allow the solution to query search results spatially.

It's FREE (requires a Bing Maps API Key) to download you can download the solution from the Download - FAST Spatial Search Toolkit page.

For detailed steps on setting up the solution, check out the FAST Spatial Search Toolkit Installation post.

Monday 10 October 2011

I'm Speaking at SharePoint Saturday Melbourne - FAST Spatial Search Center Overview

I'm flying from Perth to Melbourne for SharePoint Saturday Melbourne on the 22nd October 2011. My buddy and coworker at CSG, Bhavik Merchant will also be there to present a talk on PowerPivot for SharePoint 2010.

My session will provide a technical overview of my FAST Spatial Toolkit solution.