0

I am trying to have certain documents be listed first in search results for my company's SharePoint site (not Online). To do this, I am creating a new query rule, removing search conditions, and "change ranked results by changing the query". Then I set a filter on the content type to equal the desired content type (or file extension, that did not work either). The test query results don't return anything if it's a custom content type I made. The query test does seem to work with sorting documents according to last modified time, but when I try it in the site's search bar I get different results (documents from a year or more ago instead of the ones changed yesterday).

I have tried creating these rules at the site collection level as well as the subsite level, nothing seems to change the results. Any idea what is going on here? Could it be some other setting somewhere is blocking these changes from taking effect? Does it just need to reindex? Thanks in advance.

3
  • You should be able to use "Change the ranked results". Did you choose the right Result Source? Are you using an XRank calculation? What is your query? (No, it does not need to reindex.) – Matthew McDermott Sep 28 '19 at 11:49
  • To start, for changing the order of document results to be in order of last modified, I am doing:"Documents (System)" as the context. Removed the default condition so it works on all queries. "Change ranked results by changing the query" - everything default except for the sorting, which is descending order of last modified. Documents from 2016 still rank higher than documents that were just added last month. I want to change that. – st_9 Oct 1 '19 at 14:44
  • In that case you have to use XRANK to boost the content matching your query. – Matthew McDermott Oct 2 '19 at 17:53
0

I assume you want to show certain documents at the top of search results. You can try promoted result or result blocks in Query to do this. Both of them will show certain results beyond common result according to the condition you set(seems you want it to act for queries).

My demo: You can see the documents put on the top while not having anything to do with the keyword enter image description here

My settings for the query rule: enter image description here

This rule will simply put the documents in front of search results. You can do more configuration according to this blog and this article.

Information about promoted results you can check: https://blogs.technet.microsoft.com/tothesharepoint/2012/09/18/what-happened-to-best-bets-introducing-query-rules/ http://www.benprins.net/2013/04/15/sharepoint-2013-promoted-results-aka-best-bets/

3
  • Based on the last link you provided and other sources, it looks like promoted results are for linking to a specific destination for specific queries. What I was after was promoting any search result hit to the top of the list based on certain criteria (like type of document). Then you could click the link to go to the document that matched with any search term. I think I need to change query weights to achieve this. – st_9 Sep 27 '19 at 15:53
  • @st_9, have you checked the result block? You can add result block to show certain results based on your required criteria with your search query in the search box and put the block on the top of the results. I assume that fits your requirement well. – Jerry_MSFT Oct 2 '19 at 8:35
  • I tried the result block and it worked. I mistakenly thought that the result block was just for formatting/display template. Sorry for the delayed response, imgur is blocked where I work.Thanks! – st_9 Oct 7 '19 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.