SharePoint Online – Search Results not Sorted

While using the People Search Core Results web part, I changed the query and set the Sorting value to a RefinableString that was configured to be sortable. However, the search results were not displaying in the sort order. It turns out that the Available Sort Orders (JSON) setting in the Results Control Settings section of the web part task pane supersede the Sort Order specified in the Query.

I had to change the  Available Sort Order to the following:

 [{“name”:”Last name (A-Z)”,”sorts”:[{“p”:”RefinableString00″,”d”:0}]},{“name”:”Last name (Z-A)”,”sorts”:[{“p”:”RefinableString00″,”d”:1}]},{“name”:”First name (A-Z)”,”sorts”:[{“p”:”FirstName”,”d”:0}]},{“name”:”First name (Z-A)”,”sorts”:[{“p”:”FirstName”,”d”:1}]}]

Thanks to the articles at http://stevemannspath.blogspot.com/2013/03/sharepoint-2013-allowing-users-to-sort.html and http://www.sharepointconfig.com/2013/05/how-to-create-a-simple-sharepoint-2013-people-directory/

 

Advertisements

Why I Need a Blog

I received a request for assistance from one of employees, and after working on the problem for 30 minutes, I got nowhere. I came back to work a few days later and she asked me if I had the problem fixed, I didn’t, so I took a look again and all of a sudden it seemed very familiar. I did a search on the internet and found several articles about the problem. One of the proposed answers was something that I had written 16 months earlier that I had forgotten about. I NEED this blog to help me keep track of things that I have learned. Hopefully, it may help some other people also.