none
displaying search results sp online alphabetically for results web part.

    Question

  • i am using the below script for search results web part for displaying the sites, webs having access

    (contentclass:STS_Site OR contentclass:STS_Web) AND NOT WebTemplate:SPSPERS AND NOT WebTemplate:Group AND NOT WebTemplate:App AND NOT WebTemplate:AppCatalog AND NOT WebTemplate:PolicyCtr AND NOT WebTemplate:POINTPUBLISHINGHUB AND NOT WebTemplate:POINTPUBLISHINGTOPIC AND NOT WebTemplate:EDISC AND NOT */sites/app_* AND NOT *-my/* AND NOT */contentTypeHub AND NOT *-public*

     However i want to display the results alphabetically not the usual order.

    How do i go about making this change.

    thanks

    Thursday, March 16, 2017 2:02 PM

All replies

  • Hi exploreIT,

    To sort the search results by Title alphabetically “Title (A-Z)”, we can format the JSON such as below.

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



    Here is a blog provides information about how to use JSON sort in the Search Results web part:

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

    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, March 17, 2017 9:48 AM
  • I have expanded settings of the property for the web part, checked json and pasted the script you have provided.

    It gave me error saying: Property doesn't exist or is used in a manner inconsistent with schema settings.

    Friday, March 17, 2017 11:18 AM
  • Hi exploreIT,

    Please run an IISRESET on the query server and then check if it works.

    Are you using the Fast Search Center site?

    If you are using a Fast Search Center site, restart the Fast qrserver to push the Index Schema.

    nctrl restart qrserver


    Read the following article for more information:

    https://support.microsoft.com/en-us/help/2468431/property-doesn-t-exist-or-is-used-in-a-manner-inconsistent-with-schema-settings

    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

    Saturday, March 18, 2017 2:30 AM
  • I am working on sharepoint online so i dont have the rights to actually run IISRESET.
    Monday, March 20, 2017 8:52 PM
  • Hi exploreIT,

    Please check your search schema settings.

    Search for “Title” managed property, check its settings.


    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

    Tuesday, March 21, 2017 1:48 AM
  • I have the following properties with title; which one do i choose now


    Thursday, March 23, 2017 3:02 PM
  • Hi exploreIT,

    Please make the “Title” managed property sortable.

    If you cannot edit the “Title” property, you can create a new managed property, map crawled properties to it and make it sortable.

    In SharePoint Online, when we have changed a managed property, or when we have created new managed properties, the site must be re-crawled before our changes will be reflected in the search index. Because our changes are made in the search schema, and not to the actual site, the crawler will not automatically re-index the site. To make sure that our changes are crawled and fully re-indexed, we must request a re-indexing of the site. The site content will be re-crawled and re-indexed so that we can start using the managed properties in queries, query rules and display templates.

    Here is an article about how to manually request crawling and re-indexing in SharePoint online:

    https://support.office.com/en-us/article/Manually-request-crawling-and-re-indexing-of-a-site-a-library-or-a-list-9afa977d-39de-4321-b4ca-8c7c7e6d264e

    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

    Tuesday, March 28, 2017 12:19 PM
  • It says

    Sortable: 
    Yes - active: Enables sorting the result set based on the property before the result set is returned. Use for example for large result sets that cannot be sorted and retrieved at the same time.
    Yes - latent: Enables switching sortable to active later, without having to do a full re-crawl when you switch. 
    Both options require a full crawl to take effect. 

    Is it ok to apply sortable for this column; which is disabled though.

    Or is it something which can be achieved using display template.

    Please let me know, if you find any link.

    • Edited by exploreIT Friday, March 31, 2017 2:15 PM
    Friday, March 31, 2017 2:14 PM
  • Hi exploreIT,

    Setting the managed property to be sortable would not cause issue.

    If you do not want to change the default managed property, you could create a new managed property.

    Information about the search schema in SharePoint Online:

    https://support.office.com/en-us/article/Manage-the-search-schema-in-SharePoint-Online-d4fab46d-ba41-4c03-9d4c-32b5b33198b6

    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

    Tuesday, April 04, 2017 9:22 AM
  • the sortable column is disabled; how do i enable it; i am unable to tick it 

    thanks

    Tuesday, April 04, 2017 12:39 PM
  • Hi exploreIT,

    Please create a new managed property that points to the same crawled properties that the OOB managed property is pointing to.

    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

    Wednesday, April 05, 2017 1:37 AM