5
votes

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!

2
Oh and by the way, in the future I'll be trying to run a query where it will check if the "userId" field is equal to several values (a user's friend list on a social networking website) and if the result is, it's boosted higher in the results.Andy Cox

2 Answers

-3
votes

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