Customizing MOSS Search Results – A couple of gotchas

Customizing MOSS Search Results – A couple of gotchas

I have a custom field in a BDC Entity with a field called “WebPage“, which is the path to a photograph of an employee.  (Note the mixed case, this will be important later).  I wanted to change output of the search results to display this picture. i.e. I want to go from this:

To this:

  A few steps were required:

1.   In the Shared Service Provider, Search Settings, Metadata Property Mappings…add a new Managed Property that points to the WebPage BDC field:

2.  Make sure the BDC is added as a Content Source (SSP, Search Settings, Content sources and crawl schedules) and scope for the BDC application. and do a full crawl of the BDC content source.
3.  Create a custom scope and custom search page (see for a example)

4.  Modify the Search Core Results web part:  Add the custom column to the list of Selected Columns:

Also under Miscellaneous properties, set the Scope to be your BDC search scope.

and then proceed to modify the XSLT…

I found this snippet of XSLT from Patricks article , which outputs the search results as straight XML, to be very uesful for troubleshooting problems:

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

<xsl:stylesheet version=”1.0″ xmlns:xsl=””>

<xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ indent=”yes”/>

<xsl:template match=”/”>

<xmp><xsl:copy-of select=”*”/></xmp>



Here is a small snippet of the output.  NOTE that the field is lower case “webpage“, even though our Managed Property is mixed case “WebPage“.  This is very important in the XSLT that you will write to display this field data!!:

So now, I put the original XSLT back.  I want to replace the original small icon that comes back, with a picture located in the WebPage variable path:

So I found this bit:

<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}” />

which gives us this result:

and replaced it with this bit:

<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=”{webpage}” border=”0″ alt=”{webpage}” />

And we get these results:

TechTalk Bloggers here I come….. :-)

The ever vibrant Andrew
 pinged me an email yesterday asking for my involvement in becoming
a TechTalk Blogger……..

I’m currently on this Island called ‘Hamilton’ at a ‘Partner’ Conference (yeah right!!!
:)) so naturally I said ‘yes!’ (not too many people are saying ‘no’ around here)

I’ve got some great stories around RFID, BizTalk R2 and obvious integration into
WSS/MOSS and what that means.

Hope you’re going to join me on a great journey together! Gotta dash
the scuba diving boat is waiting for me… (erm…the next ‘partner activity’)


A couple of Partner Conference gems…..Innovative Search Interfaces

I’m currently kicking back at the partner conf. here on Hamilton Island – I have to
kick myself to remind me that I am on a conference. Beautiful scenery and temperature….I’m
sure you get the classic sunset palm tree over a beach image in your mind……
more need to be said.

What I did want to share – I’m currently listening to Ian Polangio (MS Sharepoint
TS) where he brought up a couple of great (beta) Search sites.

1. –
here’s a talking person who acts and ‘shows’ parts of your search results.
(She has a bit of attitude to boot as well)

2. –
silverlight based search site. Builds trees and it’s quite interactive.
I did a search on my name ‘Mick Badran’ and some interesting results came up 🙂

Very interactive in Silverlight – lots of things spinning and moving and pinning

Dual WAN With Load Balancing

Dual WAN With Load Balancing

Not long ago, I had my office server connected to the Internet through a consumer cable connection without a fixed IP address.  This worked OK for a while as the IP address didn’t change very much.  But about 2 months ago the ISP changed the way they did things and my IP address was changing every day.  I thought I had better bite the bullet and a get a business ADSL 2+ line with a fixed IP address, so I did.  But I was reluctant to give up my cable connection as it had been reliable (plus the modem was all paid for).  So I started to investigate the feasibility of keeping both Internet connections for redundancy and possible load balancing.  I was surprised to find that there are quite a few routers out there that are designed to connect to multiple WANs and do all the failover and load balancing for you.  The Linksys RV082 looked like a good candidate and I managed to find a second hand one for $150.00 (Australian).  I was so surprised how easy it was to configure.  I downloaded and installed the latest firmware to start with.  Then I plugged the ADSL modem into one WAN port and the Cable modem into the other.  I configured each connection and then ticked a box for load balancing and that was it.

Here’s a photo of the whole rig:

Here’s a couple of the config screens:



I was just so impressed with the RV082.  It has been extremely reliable and does exactly what it is supposed to do with very easy configuration.