Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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 –  Bibhu Lenka Apr 28 at 22:50

Your Answer

 
discard

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.