tags:

views:

820

answers:

2

Hello, I'm pretty new to Solr but I'm trying to integrate it in to my website. I've been looking in ways to "boost" results in Solr queries, but I'm having a hard time understanding how to achieve what I'm trying to do.

I'm trying to "boost" certain results in Solr searches that have the field "userId" set to 1. For example, if there were two documents in the index that had the exact same text relevance but the first document had the "userId" field set to "1" and the other had it set to "4", then the first document would be positioned higher in the results.

Is there anyway I can do this? Thank you very much!

+1  A: 

There are several ways you can do this:

Also take a look at the Solr relevancy FAQ where this kind of questions are answered.

Mauricio Scheffer
A: 

use "&sort=score desc,userId asc" as parameter might help

2ni