I am working in a SharePoint 2013 Enterprise Search Center, and looking to change the default Sort options on a Results page. To do this, I am modifying the “Available sort orders (JSON)” property of the Search Results Web Part:
I have modified the JSON so that the date-driving options are first. For example, I have placed Relevance after the “Newest” and “Oldest” options:
[{"name":"Date(Newest)","sorts":[{"p":"Write","d":1}]},{"name":"Date(Oldest)","sorts":[{"p":"Write","d":0}]},{"name":"Relevance","sorts":[]},{"name":"Lifetime Views","sorts":[{"p":"ViewsLifeTime","d":1}]},{"name":"Recent Views","sorts":[{"p":"ViewsRecent","d":1}]}]
When I publish the page, everything initially appears fine. When a search is performed, the ‘newest’ items are returned in the results. However, when I select “Relevance” from the drop-down list, the Sort drop-down changes back to “Date(Newest)”, and the results are sorted in the ‘newest’ sort order.
Below is a quick video on what I am seeing:
http://screencast.com/t/jAyNN6Xt
Does the Search Result Web Part have issues if “Relevance” is not the primary option? Is there still a way to allow for “Relevance” as a secondary option? Is it possibly because the “sorts” options are empty in the “Relevance” JSON values?
P.S. I was also able to duplicate this behavior on an Enterprise Search Center hosted in SharePoint Online/Office 365.