To present additional information in the search result will often give a better user experience. The search results web parts can easily be modified to include meta data stored on e.g documents in MOSS.
The meta data is stored via Content Types and the search engine is mapping into these meta data using Managed Properties.
Central Administrator is used to do meta data property mapping:
The managed properties can then be used in the result set.
Go to the search center, perform a search and then edit the search result page.
Add the managed properties, you would like to expose in the result list, in the search result web part’s result query option property:
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Columns> <Column Name="WorkId"/> <Column Name="Rank"/> <Column Name="Title"/> <Column Name="Saksbehandler"/> <Column Name="Dokumenttittel"/> <Column Name="Mottaksdato"/> <Column Name="Arkivkode"/> <Column Name="AvsenderMottaker"/> <Column Name="Dokumenttype"/> <Column Name="Dokumentdato"/> <Column Name="Selskap"/> <Column Name="Filename"/> <Column Name="Author"/> <Column Name="Size"/> <Column Name="Path"/> <Column Name="Description"/> <Column Name="Write"/> <Column Name="SiteName"/> <Column Name="CollapsingStatus"/> <Column Name="HitHighlightedSummary"/> <Column Name="HitHighlightedProperties"/> <Column Name="ContentClass"/> <Column Name="IsDocument"/> <Column Name="PictureThumbnailURL"/> </Columns> </root>
The search result web part’s result xsl also has to be modified to present the managed properties to the user. Open the xsl and scroll down to the section that starts with the following:
<!-- This template is called for each result --> <xsl:template match="Result">
Add your code within the section, (example):
<xsl:call-template name="DisplayReadOnly"> <xsl:with-param name="str" select="avsendermottaker" /> <xsl:with-param name="metadata">avsendermottaker</xsl:with-param> <xsl:with-param name="label">Avsender/Mottaker</xsl:with-param> </xsl:call-template>
<xsl:call-template name="DisplayReadOnly"> <xsl:with-param name="str" select="mottaksdato" /> <xsl:with-param name="metadata">mottaksdato</xsl:with-param> <xsl:with-param name="label">Mottaksdato</xsl:with-param> </xsl:call-template>
Following two steps…
…will expose more information about the document to the end users: