我执行以下查询时的问候
Item<ItemData> has property
public virtual ItemData Data { get; set; }
Item<EquipmentData> has property
public virtual EquipmentData Data { get; set; }
Item<ANOTHER> has property
public virtual ANOTHER Data { get; set; }
相同的查询更易于阅读
fl=id model label timestamp score uuid&echoParams=all&qf=label^6 content_level_high^5 content_level_middle^2 content_level_less^1&hl.fl=teaser&wt=xml&rows=9&defType=edismax&facet=true&bq=model:"Component"^10 model:"Object"^90 model:"Address"^1 model:"eav_table_54f5d74b4efef9.49994240"^14&debugQuery=on&start=0&q=Fraumünster
到一个solr 3.6.2服务器它接上了&#34;模型&#34;字段将被完全忽略。
因为所有的推文都通过在&#34;标签&#34;中点击一次得到相同的分数。 所以订单应该通过提升查询顺序完成。
这里有一个完整的解释: http://explain.solr.pl/explains/ipu6qacf
原始查询结果: http://pastebin.com/3uFdd8uw
Solr架构(对于solr 5.x): http://pastebin.com/0pZB5gDt
Solr配置: http://pastebin.com/Kd6W2nYD
solr中添加语法的文档: http://pastebin.com/HMBrwAWV
有人知道提升查询有什么问题吗?
答案 0 :(得分:2)
请在单个参数中指定所有提升查询:
bq=model:"Component"^10&bq=model:"Object"^90&bq=model:"Address"^1&bq=model:"eav_table_54f5d74b4efef9.49994240"^14
然后在相关性中正确解析和识别查询:
+(content_level_less:chang | label:chang ^ 6.0 | content_level_high:chang ^ 5.0 | content_level_middle:chang ^ 2.0)model:Component ^ 10.0 model:Object ^ 90.0 model:地址模型:eav_table_54f5d74b4efef9.49994240 ^ 14.0
0.1813628 =(MATCH)总和:0.13184154 =(MATCH)max:0.13184154 =(MATCH)权重(标签:chang ^ 6.0 in 4)[DefaultSimilarity],结果:0.13184154 =得分(doc = 4,freq = 3.0),乘积:0.041205455 = queryWeight,乘积:6.0 =增强1.8472979 = idf(docFreq = 2,maxDocs = 7)0.003717633 = queryNorm 3.1996138 = fieldWeight in 4,乘积:1.7320508 = tf(freq = 3.0), freq为:3.0 = termFreq = 3.0 1.8472979 = idf(docFreq = 2,maxDocs = 7)1.0 = fieldNorm(doc = 4)0.04952125 =(MATCH)权重(模型:组件^ 10.0 in 4)[DefaultSimilarity],结果:0.04952125 =得分(doc = 4,freq = 1.0),乘积:0.04290709 = queryWeight,乘积:10.0 = boost 1.1541507 = idf(docFreq = 5,maxDocs = 7)0.003717633 = queryNorm 1.1541507 = fieldWeight in 4,product of :1.0 = tf(freq = 1.0),freq为:1.0 = termFreq = 1.0 1.1541507 = idf(docFreq = 5,maxDocs = 7)1.0 = fieldNorm(doc = 4)
我希望有所帮助!