Adding web title to your SharePoint 2010 search refiner

If you worked with SharePoint 2010 Faceted Search you know that now you have a refiner web part allowing you to refine your search by various criteria. The criteria in the refiner web part can be adjusted, removed or new ones can be added. As always there s a trick to things working. .. here is what’s involved in adding a Web Title to the refiner properties.

What we want to achieve here is when users search for keywords contained in files on various webs – we want the titles of those Webs to show up in the refiner web part.

I assume you already have the search there site.

1. Switch to the edit mode of the result page.

2. Locate the Refinement Panel Web Part and select Edit Web Part.

3. Under the Refinement category of the properties locate Filter Category Definition

4. Open the XML in some sort of an editor and add a new <Category></Category> to the list of existing categories.

Here is how the code of that category will look like:

LessLinkText="show less" ShowCounts="Count"></Category>
LessLinkText="show less" ShowCounts="Count"></Category>
LessLinkText="show less" ShowCounts="Count"></Category>
LessLinkText="show less" ShowCounts="Count"></Category>
LessLinkText="show less" ShowCounts="Count"></Category>
LessLinkText="show less" ShowCounts="Count"></Category>

Above, everything is pretty explanatory – we bind to the MappedProperty=”sitetitle” and show the results along with any corresponding properties.

Now, the only thing left is to make sitetitle to be accessible through a refiner.

1. Navigate to your SharePoint 2010 Central Administration.

2. Open Manage Service Applications UI.

3. Open Fast Query service application.

4. Under Administration on the left click Fast Search Administration.

5. Select Managed Properties and find the SiteTitle prperty.

6. Open the property details page and ensure you have the Refiner Property is selected along with others that look like this:

Click OK and now you should be all set. You can save you modified Refiner WebPart and perform another search. If your keyword matches any documents on several sub sites on the farm – those sub sites will show up in refiner.

Good Luck!

About the author: Yaroslav Pentsarskyy