SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

so here is my question: I am currently working on a project, which was previously handled by multple different firms. So the code is kinda messy.

In order to rank a people-search-result I've tried the following:

I created a custom ranking model.

After that I derived from Core Results Webpart and overridden the OnItit()-Method in order to change the DefaultRankingModelID-Property. -> doesn't work..

In The ResultsPage-Module, where my custom ResultsWebPart is instanciated, I changed the "DefaultRankingModelID"-Property right the same way.

After that I've added the "&rm1="-Tag to the search query.

Nothing is working at all. It just ignores whatever I've tried and still sorts the result by "Employee-ID". Strangely I am able to sort the Results. But I need to rank them by proximity, then by name, and so on...

Hope you got the idea... Help would be really appreciated! I smashed my head at the wall like a thousand times!

share|improve this question
Did you find a solution to this? – Trevor Seward Feb 13 '15 at 19:29

You need to modify the Query Properties.

This is how to do it for SharePoint 2013.If you are using Microsoft.Office.Server.Search.Query.KeywordQuery you can assign Your rankingmodelid to keywordQuery.RankingModelId

share|improve this answer
Did the above answer worked for you? We are going through same problem – user25448 Apr 28 '14 at 22:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.