Enable Sort Option in Search Result Page Share Point 2013

Adding the sort option on Search pages, It really comes like value addition to the search result. Everything or Document search have different option as OOTB where People search have different option as OOTB which will be depicts in below screen shots:-


1.Edit the Page 


2. Edit the search result web part

3. In the web part tool pane, scroll down and expand the Settings section. Click the Show sort drop down check box:


4.The sort options are controlled by the JSON in the Available sort orders text box. You may modify this to add or remove sort options. Feel free to choose from any of the 600+ managed properties available out-of-the-box. 

 Click OK in the toolpane and check-in the changes of the page.

Perform a search. A drop-down appears above the results


Similarly we can do with People Search also:-
You can follow same above step 1 and step 2

5. Select the check box i.e. show drop down  and JSON object will be different here.


6. Click OK in the toolpane and check-in the changes of the page.

   Perform a search. A drop-down appears above the results




3 comments:

  1. Hi, thank you very much for this detailed information. Could you tell me where I could find the appropriate code for more search orders? I would like to sort the results by file name and extension.
    Thanx
    Martin

    ReplyDelete
  2. Thanks Martin,
    you can try below option, might be it will help:-
    Option 1:- Try with File extension as manage property as sort option.
    Option 2:- Write a small JS function in CEWP which will modify the url with defined JSON format in term of file extension or Custom code.
    Option 3:- Different one but you can try with Query rules.

    ReplyDelete
    Replies
    1. Thanks again, but I am a newbie and I can't write functions at all. I would need proper code lines which I would paste in the field under the heading "Available sort oders (JSON). It would be great if you could indicate a Reference where I could search myself cos I couldn't find anything online.

      Delete