none
Ordering articles and documents in search results using XRANK and Query Rules

    Question

  • I have a SPO intranet portal and the requirement is to have search results ordered like this: Articles (in Pages library) that have the keyword in their title should display first, followed by those having keyword in their content (body) and all other documents (docx, pptx, pdf, etc.) should come in last, after the articles. Can anyone help, how this ordering can be done using XRANK expression and/or query rules?

    Thanks in advance...



    • Edited by Farhan82 Wednesday, March 15, 2017 1:42 AM
    Wednesday, March 15, 2017 12:59 AM

All replies

  • Hi Farhan82,

    We can add dynamic ordering rule to show most relevant data on top.

    1. Edit the page, and edit the Search Results web part.

    2. Change the query.

    3. Under Sorting tab, select Add dynamic ordering rule from the Dynamic ordering section.

    Here is an article about how to change the order in which search results are display:

    https://technet.microsoft.com/en-us/library/dn794217.aspx

    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

    Thursday, March 16, 2017 9:30 AM
  • Thanks Linda, I have tried the approach described in that article, it only solves part of the problem i.e. promoting articles on the top. I also need an ordering within the articles themselves - those having keyword in the title should display on top of those articles that have it in their content (body). Is it possible to have XRank expressions in query text similar to what you described in this thread https://social.technet.microsoft.com/Forums/ie/en-US/d6813254-ca74-4281-87b1-f133b5d71d86/how-can-i-promote-documents-whose-filename-contains-the-terms-searched-to-the-top?forum=sharepointsearch for my scenario? If not, then can you suggest other ways to meet the requirement.
    Thursday, March 16, 2017 10:46 AM