solr如何计算score?

solr计算一个query的score分为两个部分:

  1. Lucene的算分模型
  2. Boost

其中Lucene的算分模型包括:

1. tf - Term Frequency. The frequency with which a term appears in a document. Given a search query, the higher the term frequency, the higher the document score.

2. idf - Inverse Document Frequency. The rarer a term is across all documents in the index, the higher it's contribution to the score.

3. coord - Coordination Factor. The more query terms that are found in a document, the higher it's score.

coord is the coordination factor - if there are multiple terms in a query, the more terms that match, the higher the score.

4. fieldNorm - Field length. The more words that a field contains, the lower it's score. This factor penalizes documents with longer field values. In another word, matches on a smaller field score higher than matches on a larger field


Boost可以分为index-time boost和query-time boost:

Index-time boosts are applied when adding documents, and apply to the entire document or to specific fields.

Query-time boosts are applied when constructing a search query, and apply to specific fields.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

O溺水的鱼0

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值