【问题标题】:Unable to understand boost function solr query无法理解 boost 函数 solr 查询
【发布时间】:2017-06-07 12:51:55
【问题描述】:

我是 solr 的新手,并试图了解 boost 功能的工作原理。

在现有查询下方 -

    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

查找上面查询的结果集 -

  <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>

谁能帮我理解上面的分数是如何计算的?

是在字段中匹配的最大单词数吗?或者是用于计算分数的单个单词的频率?还是别的什么?

请指导。

谢谢,

Vibhav

P.S - 如果有人选择否决这个问题,请在 cmets 中提及原因,以便我改进这个问题的细节。

【问题讨论】:

    标签: boost solr solr-query-syntax


    【解决方案1】:

    如果无法访问您的 Solr 实例,就无法弄清楚您的分数是如何计算的,因为它取决于很多因素(匹配、术语、字段、频率等)。我的建议只是将debugQuery=true 添加到您的查询中并检查您将获得的调试输出(一个附加部分),其中包括您的查询如何转换以及如何计算分数,请做好准备,因为输出相当详细。

    我强烈建议您使用http://splainer.io/ 非常有用地表示分数的计算方式以及哪些是影响您得分的更重要因素。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-08-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-23
      相关资源
      最近更新 更多