When it comes to search, there has been quite a shift for the last little while.
Starting from single advanced search page where users are asked all sorts of things before they click `search` just to find out nothing matched their criteria; all the way to a single text box asking for a keyword and displaying various options and categories. The later approach helps users see information on your site in more organized way thus making your site look more professional and organized. SharePoint has all the ingredient for a great search recipe. In here we`ll use SharePoint Faceted Search tool available from codeplex.com to allow categorizing of your search results by any desired criteria.
In order for a faceted search to be able to pick up your custom metadata properties, first you need to create column(s) within your sharepoint list or library that will store information about the type of the document you`re trying to categorize. Once that column is created and populated for any items you`re interested in you need to help sharepoint discover your custom document or list property.
For example, In my case I have a Type property that I created in my document library. Now I need to perform a sharepoint full crawl to pick up my new data:
1. Open http://[servername]/ssp/admin/_layouts/schema.aspx.
2. Click New Managed Property

3. In the property name field type your managed property name (in my case `Type`)

4. Click Add Mapping button to associate crawled property to managed property.
5. In a new window Crawled property name type the name of the field you gave when defined your metadata elements (in my case `Type`) and click find.
6. From few results select the one that resembles your field name in my case it`s called “ows_Type(Text)”

7. Click on it and click OK.
8. Check off the “Use in scopes” checkbox, and click OK.
Now my custom managed property representing a Type of Document column is recognized by SharePoint search; I will use Faceted Search webpart to categorize my results by that column.
If you`re provisioning your webpart within site definition here are the steps:
Open ONEL.XML of the search center site definition
2. Find the following line: <File Url=”results.aspx”>
3. Add the faceted search webpart to your page`s Right web part zone:
<AllUsersWebPart WebPartZoneID=”RightZone” WebPartOrder=”1″>
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchFacets" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="TitleIconImageUrl" type="string" />
<property name="ExportMode" type="exportmode">All</property>
<property name="QueryMethod" type="Microsoft.SharePoint.Portal.ExtendedSearch.Common.QueryMethodEnum, Microsoft.SharePoint.Portal.ExtendedSearch, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a646907c4a695009">KeywordQuery</property>
<property name="Description" type="string">Facets are managed properties used to group search results and provide an intuitive way to refine the search.</property>
<property name="ShowEmptyFacet" type="bool">False</property>
<property name="AllowZoneChange" type="bool">True</property>
<property name="CropMax" type="System.Int16, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">20</property>
<property name="FacetNameCss" type="string">ms-navheader</property>
<property name="TitleUrl" type="string" />
<property name="SelectColumns" type="string"><?xml version="1.0" encoding="utf-8" ?><root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi="http://schemas.microsoft.com/SharePoint/FacetedSearch/"> <Columns OrderBy="None"> <Column Name="Type" OrderBy="None" TotalResults="8" /> </Columns></root></property>
<property name="ListCss" type="string">ms-navsubmenu1</property>
<property name="CachingEnabled" type="bool">False</property>
<property name="Hidden" type="bool">False</property>
<property name="Direction" type="direction">NotSet</property>
<property name="HelpMode" type="helpmode">Navigate</property>
<property name="FacetNameContainerCss" type="string">ms-quicklaunch</property>
<property name="ChromeType" type="chrometype">Default</property>
<property name="CatalogIconImageUrl" type="string">/_layouts/images/FacetedSearchWP.gif</property>
<property name="LongCacheTimeout" type="int">20</property>
<property name="Height" type="unit" />
<property name="DefaultScope" type="string">All Sites</property>
<property name="ChromeState" type="chromestate">Normal</property>
<property name="PrefixEnabled" type="bool">False</property>
<property name="AllowHide" type="bool">True</property>
<property name="AllowClose" type="bool">True</property>
<property name="FacetsListCss" type="string">ms-navsubmenu1</property>
<property name="HiddenRule" type="string" null="true" />
<property name="AllowMinimize" type="bool">True</property>
<property name="AllowEdit" type="bool">True</property>
<property name="FastCacheTimeout" type="int">2</property>
<property name="HelpUrl" type="string" />
<property name="FacetValueCss" type="string">ms-navitem</property>
<property name="Title" type="string">Refine your search</property>
<property name="Width" type="unit" />
<property name="ResultsPerPage" type="System.Int16, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">500</property>
<property name="FacetValueContainerCss" type="string">ms-navSubMenu2</property>
<property name="AllowConnect" type="bool">True</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</AllUsersWebPart><AllUsersWebPart WebPartZoneID=”RightZone” WebPartOrder=”1″>
<AllUsersWebPart WebPartZoneID=”RightZone” WebPartOrder=”1″>
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchFacets" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="TitleIconImageUrl" type="string" />
<property name="ExportMode" type="exportmode">All</property>
<property name="QueryMethod" type="Microsoft.SharePoint.Portal.ExtendedSearch.Common.QueryMethodEnum, Microsoft.SharePoint.Portal.ExtendedSearch, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a646907c4a695009">KeywordQuery</property>
<property name="Description" type="string">Facets are managed properties used to group search results and provide an intuitive way to refine the search.</property>
<property name="ShowEmptyFacet" type="bool">False</property>
<property name="AllowZoneChange" type="bool">True</property>
<property name="CropMax" type="System.Int16, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">20</property>
<property name="FacetNameCss" type="string">ms-navheader</property>
<property name="TitleUrl" type="string" />
<property name="SelectColumns" type="string"><?xml version="1.0" encoding="utf-8" ?><root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi="http://schemas.microsoft.com/SharePoint/FacetedSearch/"> <Columns OrderBy="None"> <Column Name="Type" OrderBy="None" TotalResults="8" /> </Columns></root></property>
<property name="ListCss" type="string">ms-navsubmenu1</property>
<property name="CachingEnabled" type="bool">False</property>
<property name="Hidden" type="bool">False</property>
<property name="Direction" type="direction">NotSet</property>
<property name="HelpMode" type="helpmode">Navigate</property>
<property name="FacetNameContainerCss" type="string">ms-quicklaunch</property>
<property name="ChromeType" type="chrometype">Default</property>
<property name="CatalogIconImageUrl" type="string">/_layouts/images/FacetedSearchWP.gif</property>
<property name="LongCacheTimeout" type="int">20</property>
<property name="Height" type="unit" />
<property name="DefaultScope" type="string">All Sites</property>
<property name="ChromeState" type="chromestate">Normal</property>
<property name="PrefixEnabled" type="bool">False</property>
<property name="AllowHide" type="bool">True</property>
<property name="AllowClose" type="bool">True</property>
<property name="FacetsListCss" type="string">ms-navsubmenu1</property>
<property name="HiddenRule" type="string" null="true" />
<property name="AllowMinimize" type="bool">True</property>
<property name="AllowEdit" type="bool">True</property>
<property name="FastCacheTimeout" type="int">2</property>
<property name="HelpUrl" type="string" />
<property name="FacetValueCss" type="string">ms-navitem</property>
<property name="Title" type="string">Refine your search</property>
<property name="Width" type="unit" />
<property name="ResultsPerPage" type="System.Int16, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">500</property>
<property name="FacetValueContainerCss" type="string">ms-navSubMenu2</property>
<property name="AllowConnect" type="bool">True</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</AllUsersWebPart>
Now the last part required for your SharePoint Faceted Search webpart to pick up your custom managed search property is to configure Data property of the webpart to include your property as a column. You can configure this setting by placing the following line within `Columns` XML node of the Data configuration setting:
<Column Name="Type" OrderBy="None" TotalResults="8" />
In here Type is the name of my column, yours would be some other managed property you created in SharePoint SSP above.
Hope this will make your search look and work much friendly and intelligent to site users.
Yaroslav Pentsarskyy, Microsoft SharePoint MVP
Blog: www.sharemuch.com