Search: Fine Tuning search relevancy in Microsoft SharePoint Server 2007: Getting the search results your user expects

Relevance is about how closely the search results match what the user wanted to find.


To improve the search results that MOSS Search returns, we need to understand how search results are ranked:


SharePoint performs two types of ranking, dynamic ranking and static ranking. Dynamic ranking, is something that happens on the Query Servers and depends on query and term matching whereas static ranking occurs at index time. Static ranking is query independent and is computed at index time. Lets dive deeper into each of these:


Dynamic Ranking:

This looks at the content or property values for a content item such as:


 Anchor Text

This evaluates the text that describes a target. E.g. <A href=http://portal/site> Company Name Enterprise Gateway Portal</A>

  •  Search harvests anchor text from HTML anchor elements, WSS Link Lists, SPS 2003 listings, Word/Excel/PowerPoint 2007 (files using Open Office XML File Formats)

  • Any other File Types handled by installed 3rd Party iFilter  components

Property Weighting

Property weighting infers that matches on a specific property value can be more relevant than other property values or in document’s body.

  • MOSS 2007 automatically enhances / extraction of metadata

  •  MOSS 2007 automatic tuning

  •  Index time implementation (occurs on index server)

    • Weight is part of property definition

    • Managed properties considered in ranking (weights can only be changed through object model); New Relevance Object Model in Microsoft.Office.Server.Search.Administration Namespace

      • Configure Managed Property (managedProperty.Weight = newWeight;) or set ranking parameter on predefined documents (RankingParameter.Value)

string strURL = “http://<SiteName>”;

SearchContext srchContext;

using (SPSite site = new SPSite(“http://yourSiteName“))


     srchContext = SearchContext.GetContext(site);



Ranking ranking = new ranking(srchContext));


foreach (RankingParameter param in ranking.RankingParameters)


    RankingParameter lookedup = ranking.RankingParameters[param.Name];

    Console.WriteLine(lookedup.Name + “: ” + lookedup.Value);


      • Unmanaged properties NOT considered in ranking.

Title Extraction

Title is a very important property of ranking and are often wrong (e.g. “Slide 1”, or “Word Template Name”) MOSS 2007 has an intelligent way of overcoming this problem. What is does, is use a text extraction algorithm that generates a shadow title. How does it find a shadow title if one does not exist? It uses the headings inside your document. These are normally displayed using text formatting such as Heading 1 or Heading 2. 


Please note that this only works for Office file types, another words, the Office IFilter that MOSS 2007 search uses to pick up this information. 


URL Matching

Name of a website is normally a common type of query. MOSS Search matches site name to URL equivalent. 


Static Ranking

This describes the ranking that is not impacted by the content or property values for a content item.


File Type Biasing

In most search scenarios, certain file types are more relevant than others. This effects the MOSS Search relevance calculation ranks.


  • Order of relevancy: HTML Web pages, PowerPoint presentations, Word documents, XML Files, Excel Spreadsheets, Plain Text files, List Items

  • See Object Model : RankingParameter.Value

  •  IMPORTANT: You cannot add and/or remove File Types

Automatic Language Detection

Foreign language results are less relevant than results in user’s language

  • Index time: documents are tagged with their likely language.

  • Query time: MOSS Search determines users language via browsers headers (Accept-Language).

    • Advanced Search: User can override this default behaviour using different language.

    • Exception: ENGLISH is always considered as relevant as user’s language.

Click Distance from authoritative pages

NOTE: the difference between Click Distance and URL Depth. Click distance is not based on URL depth but rather on the path the user takes through pages to get to information.


Authoritative Pages (Configured in SharePoint Central Administration):


  • Sites linked to authoritative pages have higher relevant score.

  • Click distance can be improved by configuring authoritative pages in search admin. This effectively “bumps up” the a “X number of clicks site” to a one click site.

  • 3 levels of importance and is maintained by an administrator.

  • Pages linked to authoritative pages are MORE relevant than pages that and is adjusted until rank of all pages is influenced by its “click distance” to authoritative pages.

  • Administrators CAN demote relevance of sites. 

 URL Depth

Items with shorter urls are more relevant than items placed in longer URLs; E.g.  http://msw/ vs http://portal/divisionalsite/ProjectSite1/MeetingSite/ .Short URLS are like prime real estate and organisations tend to allocate them to the most important content.


Relevance Metrics


·         Precision@N: Avg. No. Of relevant documents in top 5, 10,etc.

·         Mean Average Precision: Avg. Precision from N-1 to R

·         Reciprical Rank: 1/rank of the top relevant document

·         Normalized Discounted Cumulative Gain (NDCG) : Represents ratio of current ranking to ideal


User’s Perceived Relevance


·         Summarization and Highlighting : Query-dependant summarization and highlighting of hits within summary.

·         Duplicate removal: Near duplicates documents are detected across index and removed at query time; can be disabled by admin

·         Best Bets: Best Bets promotion IS NO LONGER PART OF ranking algorithm

·         Did you mean? : Index informed spell checker; Only available for English, Spanish, French, (not sure of last language).





·         First crawl your content J

·         Manage authoritative pages and demoted sites carefully

·         Mine query logs to identify keywords

·         Review list of descriptions, keywords, and best bets periodically as content prioritization can change over time

·         Use admin object model CAREFULLY to change weight given to properties

·         Features in ranking formula can also be added using object model to personalize ranking criterias:


Comments (78)

  1. Anonymous says:

    Thanks Brian. Am looking at implementing MOSS 2007 as replacement for a legacy search engine and this article was really helpful.



  2. Anonymous says:

    How SharePoint select text for HightlightSummary ?

    When page conains word in other form, for example ran (search query: run) it returns some unrelated text, i think some text from beggining of page, because i get navigation very ofthen in that case very often.

  3. Anonymous says:

    This seems to be a very informative and rare article…kudos to the author for such a gud article…..

    I have a ques though……….suppose Instead of ranking by Relevance and modified date as provided by MOSS 2007 OOB…..I need to rank by say author name,title etc….how to do that…….



  4. Anonymous says:

    I have noticed that File Biasing does not include PDFs.  What does it mean for PDF relevancy?  Will a PDF be less relevant than a List Item?  How does that work?

  5. Anonymous says:

    At Coveo, we encourage evaluators to actually measure relevance with their own documents and content.  It’s pretty easy and very revealing as to whether the underlying search software is doing relevance well.  In a nutshell, gather 50-100 queries, decide in advance which document is the best result, set up the search software (Coveo takes about 30 minutes even integrated with SharePoint), run your searches, and assign the position of each result as the score (use 100 if the result is past the first 100).  Add up all the scores, and divide by the number of queries and you have your overall score.  A score of 1 means the best result on average was first on the first page.  A score of 50 means on average the 50th result, and so on.  Small note, take into account that the search engine may have found a better result…you never know, so look at the results before your pre-chosen "best".  Coveo has won many many bakeoffs this way.

  6. Anonymous says:

    open search of doc libs shows a "view duplicates" option where multiple files satisfy the search criterion (say found in different doc libraries). If I then go to Advanced search, and use a property value such as "name" contains "text of interest" and I get a single return rather than the say 8 items that open search revealed. This behavior seems just wrong headed. In my thinking if I wanted less precision I would choose the open search, and going to the trouble of Advanced property searching I obviously want more precision of search results. Less bulk, more detail… or is it just me?

  7. Anonymous says:


    Is there any way to stop the search from indexing columns, eg not to index the author, createdby columns.  I’ve tried checking the columns in Searchable columns at the top level site but this doesn’t seem to be being identified.



  8. Anonymous says:


  9. Anonymous says:


  10. Anonymous says:


  11. Anonymous says:

    セレブ達は一般の人達とは接する機会もなく、その出会う唯一の場所が「逆援助倶楽部」です。 男性はお金、女性はSEXを要求する場合が多いようです。これは女性に圧倒的な財力があるから成り立つことの出来る関係ではないでしょうか?

  12. Anonymous says:


  13. Anonymous says:


  14. Anonymous says:


  15. Anonymous says:


  16. Anonymous says:


  17. Anonymous says:


  18. Anonymous says:

    何回かメールして会える人一緒に楽しいことしょ?お給料もらったばかりだからご飯くらいならごちそうしちゃうょ♪ とりあえずメールくださぃ★

  19. Anonymous says:


  20. Anonymous says:


  21. Anonymous says:


  22. Anonymous says:


  23. Anonymous says:


  24. Anonymous says:


  25. Anonymous says:


  26. Anonymous says:


  27. Anonymous says:


  28. Anonymous says:


  29. Anonymous says:

    熟女だって性欲がある、貴方がもし人妻とSEXしてお金を稼ぎたいのなら、一度人妻ワイフをご利用ください。当サイトには全国各地からお金持ちのセレブたちが集まっています。女性から男性への報酬は、 最低15万円からと決めております。興味のある方は一度当サイト案内をご覧ください

  30. Anonymous says:


  31. Anonymous says:


  32. Anonymous says:


  33. Anonymous says:


  34. Anonymous says:


  35. Anonymous says:


  36. Anonymous says:


  37. Anonymous says:

    最近してないし欲求不満です。一緒にいやらしいことしませんか?エッチには自信あるよ(笑) メール待ってるよ☆

  38. Anonymous says:


  39. Anonymous says:


  40. Anonymous says:


  41. Anonymous says:


  42. Anonymous says:


  43. Anonymous says:


  44. Anonymous says:

    誰か満足させてくれる人いませんか?めんどくさいこと抜きでしよっ♪ とりあえずメールして☆

  45. Anonymous says:


  46. Anonymous says:


  47. Anonymous says:


  48. Anonymous says:


  49. Anonymous says:


  50. Anonymous says:


  51. Anonymous says:


  52. Anonymous says:


  53. Anonymous says:


  54. Anonymous says:


  55. Anonymous says:


  56. Anonymous says:


  57. Anonymous says:


  58. Anonymous says:


  59. Anonymous says:


  60. Anonymous says:


  61. Anonymous says:


  62. Anonymous says:


  63. Anonymous says:


  64. Anonymous says:


  65. Anonymous says:


  66. Anonymous says:


  67. Anonymous says:


  68. Anonymous says:


  69. Anonymous says:


  70. Anonymous says:


  71. Anonymous says:


  72. Anonymous says:


  73. Anonymous says:


  74. Anonymous says:


  75. Anonymous says:


  76. Craig Humphrey says:

    Hi Brian,

    do you have any updated material for SP2010?