none
Sharepoint Online search results web part - Sort wiki pages from A - Z

    Question

  • Hi, 


    I want to know how to add a sort order from A to Z or Z  to A in a search result web part. I cannot find the right crawled property that corresponds to the "Name" -column in a wiki page library or a way to make the managed property "Title" sortable. How can i get this to work?


    Greetings,


    Ivan

    Thursday, February 9, 2017 3:45 PM

All replies

  • Hi Ivan,

    We can use the “Title” managed property for searching pages in the library and get the results.

    To use “Title” managed property to sort the search results, we need to edit the search results page and then edit the Search Results web part, then expand Settings and check Show sort dropdown. After that paste the following JSON inside the box and save the changes back to SharePoint.

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

    The screenshot for your reference:


    For more details about how to write the JSON inside the sort dropdown, please refer to the blog below.

    http://habaneroconsulting.com/insights/why-are-my-sort-orders-not-working-in-my-sharepoint-2013-search-results-web-part#.VK9Nz2Afodk

    Best Regards,

    Linda Zhang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, February 10, 2017 5:07 AM
  • Hi Ivan,

    Have you added sort orders in the search result web part successfully?

    Please feel free to let us know if further assistance is required.

    If you think the reply is helpful, please mark it as an answer.

    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, February 17, 2017 2:33 AM