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!

  • 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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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