Sharepoint 2019 Search Query Tool

Hicham JAMAL 21 Reputation points
2023-01-10T08:10:00.05+00:00

Hi All, I have a group of sites included in an enterprise search center. particular sites I'd like to have more weight in search results relevancy than the others. How do I use XRANK to do that? I've made a few tries at the syntax and can't seem to get it to work. Example is below. I'd like siteA to have a large boost

{searchboxquery} (Path:http://siteA) XRANK(NB=1.5) Path:siteb Path:sitec Path:sited

Microsoft 365 and Office | SharePoint | Development
{count} votes

Answer accepted by question author
  1. Tong Zhang_MSFT 9,256 Reputation points
    2023-01-11T08:26:41.22+00:00

    Hi @Hicham JAMAL,

    According to my research and testing, if you want to use XRANK to sort search results, you can follow these steps:

    1. Select the Search Results Web Part, and edit its properties.
    2. Click on "Change Query".
    3. Select "Sorting" in the top navigation.
      1. Select "Rank" in "Sort by", then click "Add dynamic ordering rule", and fill in "Change ranking when" as required, for example: User's image
      2. You can refer to the following XRANK expression:
    {searchboxquery} (Path:http://siteA) XRANK(cb=500)
    

    More information for reference: How To Sort Search Results by using XRANK and Query Rules?

    Similar issue: Boost site in search results with XRANK / KQL

    Hope it can help you. Thanks for your understanding.

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.