一个字段中每个匹配值的多次提升

  • 本文关键字:一个 字段 solr solr-boost
  • 更新时间 :
  • 英文 :


>我有一个多重字段,具有以下值:

"itm_field_skills":[1, 2]

现在我有以下查询:

q=itm_field_skills:(1+OR+2)^5

所以我得到了结果,但分数是5。 我想发出一个搜索请求,提升每个匹配值以获得 10 分。

绝对分数值不是您可以依赖的。您的查询并不意味着您的分数将是 5 或 10 - 只是这些术语比查询的其他部分重要五/十倍。

如果您查看 debugQuery 的输出,您会发现 boost (5( 分别应用于每个术语,然后将术语的分数相加。

4.8168015 = sum of:
1.2343608 = weight(..) [SchemaSimilarity], result of:
1.2343608 = score(doc=0,freq=1.0 = termFreq=1.0
), product of:
5.0 = boost <----
0.3254224 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:
6.0 = docFreq
8.0 = docCount
0.7586207 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:
1.0 = termFreq=1.0
1.2 = parameter k1
0.75 = parameter b
1.125 = avgFieldLength
2.0 = fieldLength
3.5824406 = weight(..) [SchemaSimilarity], result of:
3.5824406 = score(doc=0,freq=1.0 = termFreq=1.0
), product of:
5.0 = boost <---
0.9444616 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:
3.0 = docFreq
8.0 = docCount
0.7586207 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:
1.0 = termFreq=1.0
1.2 = parameter k1
0.75 = parameter b
1.125 = avgFieldLength
2.0 = fieldLength

相关内容

  • 没有找到相关文章

最新更新