Thursday, June 05, 2014

Understanding item ranking in SharePoint 2013 search

SharePoint 2013 allows you to view the result of the ranking model by retrieving the rankdetail managed property. The rankdetail property will only be returned when there are less than 100 results in the returned search result set.

There is however an interesting tool hidden inside SharePoint which outlines the rankdetails calculation which I found in Explain rank in SharePoint 2013 search. SharePoint 2013 contains a built-in  application page called /_layouts/15/explainrank.aspx which accepts two mandatory parameters:
  • q – which contains the query
  • d – which specifies the path of the item for which you want to see the rankdetail
You can download a specific Explainrank search display template which will incorporate a link to the explainrank.aspx page with the required parameters. An alternative for this which will also work on Office 365/SharePoint Online is the Mavention Search Ranking app. My current favorite for the moment is the SharePoint 2013 Search Query Tool which also allows you to show rankdetails and rank calculation.

For a deep dive explanation of all the fine details of search ranking you should definitely take a look at customizing ranking models to improve search relevance in SharePoint 2013. On a very high level relevance is determined by two different types of parameters:
  • Dynamic ranking: ranking parameters linked to the search term which is being used
  • Static ranking: ranking parameters which are being applied independent of the search query which is being used. When you look at the standard ranking algorithm being used when doing a content search – the following static parameters are taken into account:
    • Clickdistance : number of clicks between an authoritative page and items in the index.
    • QueryLogClicks, QueryLogSkips and LastClicks : use click through behavior to see if results are considered relevant by users
    • EventRate : activity tracking of usage events (clicks or view) – items with high usage activity get a higher activity rank score than less popular items. This is activity on items in SharePoint outside of the search pages.
    • URLDepth : documents which have a longer URL are considered to be less relevant
    • InternalFileType – SharePoint 2013 prioritizes some files differently based on the file type – this is the current ranking (PPT,DOC,HTML,ListItem,Image,Message, XLS,TXT,XML). The most signifcant difference with 2010 is the fact that PowerPoint get a relatively higher weight in 2013 and Excel lower.
    • Language – some languages seem to be favoured – I’m still looking into the details of this
One of the surprises with SharePoint 2013 search is that it does not take into account the freshness of results – Mikael Svenson wrote an interesting post about this in  Adding freshness boost to SharePoint Online and this functionality is now also available in the SharePoint 2013 Search Query Tool


No comments: