Improve User Experience in Enterprise Search Step By Step - Part V - Relevancy Tuning by Changing Weight

In this part we will touch a little of the core relevancy model. Be careful! The modification work described in this part can be a disaster to your search result if you don't know what you are doing.

The theory in this part of relevancy tuning comes from a technical article wrote by Dmitriy Meyerzon, Avi Schmueli and Jo-Anne West : Evaluating and Customizing Search Relevance in SharePoint Server 2007 . You can find it in MOSS SDK and MSDN library.  It should be your pre-reading material.

After go through the article, you should now understand that we can change several parameters to meet our custom needs. For example, the weighting of a managed property.

Scenario: The end users have a request - A field in their Lotus Notes system is very important, and when they do a search, they want the top results should emphasize this field.

Brilliant idea. But it will be very tough if your search engine cannot make this change. Luckily, the relevancy model in MOSS can be adjusted to meet the request. Here' re the steps.

1. We need to map this field to a managed property. For example, this field has a name:"NotesTitle", but in fact it is a subject not the title of the document. You need to create a managed property first and then map this field to this new property. Setup the Lotus Notes content source first,then crawl the database. This will make the field name shown in crawled properties list. And then you can do the mapping job.

2. After field "NotesTile" is mapped to a managed property "NotesTitle", you can now change the weight of this property. We need to call object model to do this, but there is a free tool on SharePointSearch.com.

 

snap146

You can see the weight and length parameters of "NotesTitle" are all zero. By default, MOSS will only have three properties have this setting enabled, they are Title(75.855), Author(8.215) and FileName(29.43). If you want to change a new managed property and make it more important, you need to write a higher value in their weight parameter.

Let's change it to a bigger number. The bigger the weight, the more important this property will have. (Please note there's a bug in this tool, you cannot input any value higher than 99 actually)

Then press "Update". No restart of any service, the relevancy will be applied automatically.

snap148

 

So here's the result. If you can read Chinese, you will get a more clear idea.

Result before weight tuning, please note "NotesTitle" field is listed in grey font, below Path property. In the top results, you cannot find anything of the keyword in NotesTitle. And the Rank of first result is 854.

snap147

 

Result after tuning. You can see the keyword is not in the "general title", but in our NotesTitle. And the Rank of first result is 879.

snap149

 

This can be applied to many factors. For example, you can modify languageprior parameter to make the result langauage bias. When an English user searches for something, he will get English results first. When a Chinese user searches for something, he will get Chinese content first. The language is detected through language setting of client's browser.