1

I noticed that the Web Part itself has a “Show Sort Dropdown” option. This is turned off by default but I’ve just noticed that that it is still functioning behind the scenes. Hence the default JSON configuration is to sort by. Here Trying To Sort PreferredName By Alphabetical Order but Not working Here is the JSON I used :

[{"name":"A-Z","sorts":[{"p":"PreferredName","d":0}]},{"name":"Z-A","sorts":[{"p":"PreferredName","d":1}]}]

2 Answers 2

2

Please confirm, that PreferredName is enabled for sorting in the Search Service Application!

SSA > Search Schema > Managed Properties > Search for "PreferredName" > Sorting Enabled

0

In the search results webpart you need to enable the "show sort dropdown" for this to work (setting the JSON sort order).

If this is not ticked, the webpart will not listen to the sort order you specify in the JSON.

You can though, hide the sort dropdown with some css if you need to sort on another property, but do not want to enable your users to change the sort order.

Depending on your requirements the Content by Search webpart might suite you better

1
  • Hello Robert Sir, Currently in My search results webpart "show sort dropdown" is Enable,Still it Not Display Result Apr 14, 2015 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.