Vibhav Singh Rohilla
Vibhav Singh Rohilla

Reputation: 768

Unable to understand boost function solr query

I am new to solr and trying to understand how boost function works.

Below in an existing query -

    http://solr_slave_2/solr/datCore/select?indent=on&q=qq=live+scores:+england+vs+new+zealand+champions+trophy&q={!boost+b%3D$dateboost+v%3D$qq+defType%3Ddismax}&dateboost=recip(ms(NOW/DATE,createdDate),3.16e-8,1,1)&defType=dismax&qf=title+subject&fq=(filetype:text)&start=0&rows=20&fl=title,subject,createdDate,score

Find below result set of the query above -

  <doc>
  <str name="subject">
  Get live cricket score & live commentary of 3rd wamp-up match between India vs New Zealand on Times of India.
  </str>
  <str name="title">Champions Trophy, warm-up: India v New Zealand</str>
  <date name="createdDate">2017-05-28T09:33:51Z</date>
  <float name="score">39.4114</float>
  </doc>
  <doc>
  <str name="subject">
  Get all the live updates from Match 6 of the Champions Trophy between England and New Zealand.
  </str>
  <str name="title">Champions Trophy Live: England v New Zealand</str>
  <date name="createdDate">2017-06-06T08:56:29Z</date>
  <float name="score">37.291893</float>
  </doc>

Can anybody please help me understand how the above score is being calculated?

Is it on the maximum number of words matched in fields? or is the frequency of individual words used to calculate score? or something else?

Please guide.

Thanks,

Vibhav

P.S - If anybody chooses to down-vote the question, please do mention reason in comments so that I can improve the details in this question.

Upvotes: 0

Views: 91

Answers (1)

Jorge Luis
Jorge Luis

Reputation: 3253

Without having access to your Solr instance is impossible to figure out how is your score calculated because it depends on a lot of factors (matches, terms, fields, frequencies, etc). My advice just add debugQuery=true to your query and check the debug output that you'll get (one additional section), which among other things contain how is your query transformed and how is the score calculated, be prepared because the output is quite verbose.

I strongly recommend you to use http://splainer.io/ is a really helpful representation of how the score is being calculated and which are the more important factors impacting your scoring.

Upvotes: 2

Related Questions