Solr:如果指定了排序参数,文档会得到评分吗



我们在主查询(q参数)中插入了大量功能过滤查询。我担心这些多余的部分会被不必要地得分。然而,我们确实指定了一个排序,并且分数不包括在排序中。所以我的问题是,搜索是否会得到分数,因为最终它不是按分数排序的?

基于"explain"日志,即使在字段上指定了排序参数,它看起来也会得分。

以下是我为没有排序参数的查询观察到的"解释"日志(结果按分数排序):

http://localhost:8983/solr/logmill/select?q=text_en%3A%22not+found%22&wt=xml&indent=true&debugQuery=true

<lst name="explain">
<str name="localhost/281/info/1373983754934/5ba362b4e8a6fce36ba650cf8e946771">
2.2986562 = (MATCH) weight(text_en:found in 131) [DefaultSimilarity], result of: 2.2986562 = fieldWeight in 131, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.5973125 = idf(docFreq=3, maxDocs=146) 0.5 = fieldNorm(doc=131)
</str>
<str name="localhost/258/info/1373983752897/8a2e39f484dedff91bd11b94f442bd8a">
1.7239921 = (MATCH) weight(text_en:found in 126) [DefaultSimilarity], result of: 1.7239921 = fieldWeight in 126, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.5973125 = idf(docFreq=3, maxDocs=146) 0.375 = fieldNorm(doc=126)
</str>
<str name="localhost/294/info/1373983755710/8a2e39f484dedff91bd11b94f442bd8a">
1.7239921 = (MATCH) weight(text_en:found in 136) [DefaultSimilarity], result of: 1.7239921 = fieldWeight in 136, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.5973125 = idf(docFreq=3, maxDocs=146) 0.375 = fieldNorm(doc=136)
</str>
</lst>
</lst>

以下是带有排序参数的查询的"解释"日志(结果按时间戳_tdt字段排序):

http://localhost:8983/solr/logmill/select?q=text_en%3A%22not+found%22&wt=xml&indent=true&debugQuery=true&sort=timestamp_tdt%20asc
<lst name="explain">
<str name="localhost/258/info/1373983752897/8a2e39f484dedff91bd11b94f442bd8a">
1.7239921 = (MATCH) weight(text_en:found in 126) [DefaultSimilarity], result of: 1.7239921 = fieldWeight in 126, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.5973125 = idf(docFreq=3, maxDocs=146) 0.375 = fieldNorm(doc=126)
</str>
<str name="localhost/281/info/1373983754934/5ba362b4e8a6fce36ba650cf8e946771">
2.2986562 = (MATCH) weight(text_en:found in 131) [DefaultSimilarity], result of: 2.2986562 = fieldWeight in 131, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.5973125 = idf(docFreq=3, maxDocs=146) 0.5 = fieldNorm(doc=131)
</str>
<str name="localhost/294/info/1373983755710/8a2e39f484dedff91bd11b94f442bd8a">
1.7239921 = (MATCH) weight(text_en:found in 136) [DefaultSimilarity], result of: 1.7239921 = fieldWeight in 136, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.5973125 = idf(docFreq=3, maxDocs=146) 0.375 = fieldNorm(doc=136)
</str>
</lst>
</lst>

即使当我指定&sort=timestamp_tdt%20asc在解释日志中,我看到它正在计算草皮和分数的乘积等。希望这有助于为您的问题找到答案。

最新更新