spike
spike

Reputation: 10014

Boost in sunspot (solr)

In sunspot you can hint relevancy using the :boost option:

text :name, :boost => 2.0

From this link, I think that the default boost is 1: http://lucene.apache.org/java/2_4_0/queryparsersyntax.html

My question is whether the sunspot boost amount is passed directly to the lucene boost? I'm wondering if I can do :boost => .5 to lower the relevancy of a certain result.

Upvotes: 2

Views: 1180

Answers (1)

Nick Zadrozny
Nick Zadrozny

Reputation: 7944

Yes, you are exactly right. Sunspot will use those :boost options for query-time boosting when it assembles the qf parameter.

Upvotes: 3

Related Questions