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.
Yes, you are exactly right. Sunspot will use those :boost
options for query-time boosting when it assembles the qf
parameter.
精彩评论