Sorting people search results
Hi

We tried to sort the PeopleSearch Results by LastName and then by FirstName using the Query Designer.
In the preview everything works fine, buth when we save the web part settings and do a seearch on the people results page, the results are not sorted as excpected.

Query Sorting, (sorting as expected in preview)

People results page using the settings above:

Not properly sorted

Does anybody have an idea?

Thanks,

Stephan

December 17th, 2012 9:10am

Did you try creating a new result source with the query sorting you want?  Then telling the search results web part to use it?
Free Windows Admin Tool Kit Click here and download it now
January 30th, 2013 5:16am

The LsstName and FirstName managed properties are not marked as sortable by default. Go to the search schema, mark them as sortable. Then do a full crawl. It will work after that.

Scot

February 7th, 2013 11:15am

The LsstName and FirstName managed properties are not marked as sortable by default. Go to the search schema, mark them as sortable. Then do a full crawl. It will work after that.

Scot

Hi Scot

I already did that but this did not help.

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 11:53am

Did you do a full crawl after that?

Scot

February 7th, 2013 1:01pm

Yes, inclduing a index reset
Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 1:02pm

Wow! I was able to reproduce your problem. There seems to be no way to get the sorting to work correctly in the search results. I have been able to sort the results correctly using either a) Content by Search part or b) an App issuing a query through the API.

I think you are going to have to replace the OOB people search page with a custom solution based on either the Content by Search part or an app.

I have an Employee Directory app available on my CodePlex project here.

http://apps.codeplex.com/releases/view/91377

Scot

February 7th, 2013 2:34pm

Hi Scot

Thanks for your studies. I'll implement a workaround and hope that the issue gets fixed with the next release.

Stephan

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 2:40pm

Try to modify the sorting order in the result source instead:

  1. Go to Search Administration in Central Administration.
  2. Click on Result Sources under the Queries and Results section.
  3. Edit a copy of Local People Results.
  4. Click the Launch Query Builder button and specify your desired sorting order there.
  5. Save and configure your web part to use the new result source.

February 7th, 2013 3:24pm

Try to modify the sorting order in the result source instead:

  1. Go to Search Administration in Central Administration.
  2. Click on Result Sources under the Queries and Results section.
  3. Edit a copy of Local People Results.
  4. Click the Launch Query Builder button and specify your desired sorting order there.
  5. Save and configure your web part to use the new result source.

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 3:24pm

Try to modify the sorting order in the result source instead:

  1. Go to Search Administration in Central Administration.
  2. Click on Result Sources under the Queries and Results section.
  3. Edit a copy of Local People Results.
  4. Click the Launch Query Builder button and specify your desired sorting order there.
  5. Save and configure your web part to use the new result source.

February 7th, 2013 3:24pm

Sweet! That worked!

Scot

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 4:31pm

Hmm...exactly what I said :)
February 8th, 2013 1:33am

LOL. You are correct. Still very strange and unexpected behavior.

Scot

Free Windows Admin Tool Kit Click here and download it now
February 8th, 2013 3:07am

Definitely :)
February 8th, 2013 3:24am

Hmm...exactly what
Free Windows Admin Tool Kit Click here and download it now
February 8th, 2013 10:02am

Thanks! Works perfectly.

Stephan

February 13th, 2013 12:41pm

I've set the LastName as searchable, ran a full crawl, created a people result source but when I'm sorting it at the people result source part it is still not being ordered correctly when I hit Test. I can't believe how long I've spent on trying to resolve a seemingly routine problem.
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2015 6:05am

Matthew McDermott wrote a great article on IT Unity regarding this issue and People Search.

http://www.itunity.com/article/develop-employee-directory-sharepoint-2013-1146

Code is included.

Scot

April 7th, 2015 6:49am

Thanks Scot, but that seems to imply I would have to install and deploy the 3rd party app. There is no way for SharePoint to do this out of the box? Is it a bug or is there another Search configuration that I need to change somewhere?

Thanks for your help.

Free Windows Admin Tool Kit Click here and download it now
April 7th, 2015 9:18am

It's just an example. You can see how the LastName sort was setup for the app, but you don't need to use an app.

Scot

April 7th, 2015 11:02am

Hi Scot, I'm struggling to see how it was setup sorry. We aren't using Office 365 and I've followed the instructions for setting up the LastName managed property. It's all highly frustrating :(
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2015 6:19am

Hello Expert,

I am also facing the same issue with the people search sort by LastName.

I tried every option suggested above in the blog trail, but still no success.

Anyone has resolved this?

Please suggest if any input.


Regards,

Uday

June 24th, 2015 7:29am

Hello Expert,

Issue was with the crawling the content. 

I missed out to look at the crawl logs.

I had made LastName managed property to sortbale along with that I marked it as MulitVlaue. (Same as FirstName)

Because of marked as "MultiValue" my crawler starts giving an error. 

SharePoint 2013 Crawl Log Error: Index was out of range. Must be non-negative and less than the size of the collection

I refer below blog to know more about crawler functionality and its behavior for multi value properties.

http://aghy.hu/sharepoint-2013-crawl-log-error-index-was-out-of-range.-must-be-non-negative-and-less-than-the-size-of-the-collection

Regards,

Uday G

Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 8:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics