在LTR中应用时,短语查询不起作用。
提供的功能是 { “ name”:“ isPook”, “ class”:“ org.apache.solr.ltr.feature.SolrFeature”, “参数”:{ “ fq”:[“ {!type = edismax qf =文本v = $ qq}&qq = \” $ {query} \“”] } }
在外部测试了此功能,它仅返回一个结果,即词组,但使用LTR,它在条件上匹配
http://localhost:8983/solr/techproducts/query?q=game%20of%20thrones&fl=id,name,[features%20efi.query= 宝座%20of%20game ],名称,cat&debug = true
“ response”:{“ numFound”:6,“ start”:0,“ docs”:[ { “ id”:“ 05535734023”, “ cat”:[“ book”], “ name”:“ 游戏宝座”, “ [features]”:“ documentRecency = 0.02011838,isBook = 1.0, isPook = 1.0 ,originalScore = 8.337603”}, { “ id”:“ 05535734021”, “ cat”:[“ book”], “ name”:“ 会议王座游戏”, “ [features]”:“ documentRecency = 0.02011838,isBook = 1.0, isPook = 1.0 ,originalScore = 8.179235”},
如何设置功能,使其仅对包含短语的第一个文档评分?