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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s