How do I get Solr to rank results better?

When searching for a phrase (i.e. admin password), I am unable to get the results ranked correctly.

The results of the first page are below:
Screen Shot 2023-01-18 at 10.25.11 AM

For instance, the page titled “Forgot Local Computer Password” (bottom of the screenshot) should be at the top of the results because it contains the “admin password” phrase along with the first returned result.

What can be modified to the Solr search to get the results ranked better for the end user?

Hi, you probably mistyped the search query. If you’ve typed admin password, you’ll see the results of all pages that have one of these and both words. If you want to see page(s) that hold both these words as content, you shall use this query "admin password".

Thank you for your response, @nikpetrenko.

I’m sorry for not explaining very well in my initial post. I do not want to search for a specific phrase using quotes, I was mostly giving an example of how the results are ranked and how I would like them to be ranked differently. I would like to improve the results by ranking the pages containing the phrase at the top of the results, then the pages containing both words separately, and then the pages containing just one of the words in the phrase.

And this is for an end user, so I am not necessarily expecting them to know to use quotes to return a specific phrase, which is why I am hoping I can alter how the results are ranked.

This is what I searched for, just to provide that context:
Screen Shot 2023-01-19 at 2.46.41 PM

I do not want to search for a specific phrase using quotes, I was mostly giving an example of how the results are ranked and how I would like them to be ranked differently.

However, this contradicts what you want. The search results of Solr are ranked by your query (search statement), which determines which pages match it.

I recommend you to check the documentation, especially the Search syntax, where in addition, the link in this section points to Apache Solr. For your case, you can check the Relevance | Apache Solr Reference Guide 6.6

Also, on your screen, you’ve missed one section in the result pages, and it’s sorting.
image

A reinstall of XWiki seems to have resolved the issues we were seeing on our end with ranking.

Thank you for your help, @nikpetrenko!