我有一些視頻標題存儲在我的solr索引中。我根據標題進行查詢,但希望通過評分來影響分數。該評級是典型的5星級評級。此評分與視頻一起存儲在solr中。我嘗試使用dismax請求處理程序,但看起來像solr不提升值。Solr dismax提升查詢不起作用
你可以看到我的requestHandler如下:
<requestHandler default="true" name="dismax" class="solr.SearchHandler" >
<lst name="dismax">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<float name="tie">0.01</float>
<str name="qf">
title
</str>
<str name="pf">
title
</str>
<str name="mm">
0
</str>
<str name="bq">
rating:1^1.0 rating:2^1.0 rating:3^3.0 rating:4^5.0 rating:5^10.0
</str>
<str name="fl">
*,score
</str>
<int name="ps">100</int>
<str name="q.alt">*:*</str>
</lst>
希望有人能幫助我!
我用debug運行查詢,這是調試的輸出。不能看到分級場得分的計算...
4.429465 = (MATCH) weight(title:test in 1894), product of:
0.99999994 = queryWeight(標題:測試),產品:4.4294653 = IDF(docFreq = 26876,maxDocs = 829428)0.22576088 = queryNorm 4.4294653 = (MATCH)fieldWeight(標題:1894年測試),1.0 = tf(termFreq(title:test)= 1)4.4294653 = idf(docFreq = 26876, maxDocs = 829428)1.0 = fieldNorm (field = title,doc = 1894)
更多調試信息:
<lst name="debug">
<str name="rawquerystring">test</str>
<str name="querystring">test</str>
<str name="parsedquery">title:test</str>
<str name="parsedquery_toString">title:test</str>
<lst name="explain">...</lst>
<str name="QParser">LuceneQParser</str>
<arr name="filter_queries">
<str/>
</arr>
<arr name="parsed_filter_queries"/>
<lst name="timing">...</lst>
</lst>
你可以解僱的查詢與debugQuery =並檢查調試輸出。 – Jayendra