我需要将用户属性与solr字段相匹配,并计算一个累积分数,并根据该自定义分数检索文档。你知道吗
在阅读了文档之后,我找到了两种方法来完成这个任务
1)使用Python构建函数查询,然后检索其响应 示例:如果state==“北方邦”,那么customscore=40
statescore:{!func}map(strdist(def(state_exact,""),"Uttar Pradesh",edit),1,1,40,0)
customscore=SUM($statescore,....(sum of all attribute score))
sort=product(customscore*score)
2)在java中创建自定义函数并使用它。例子你知道吗
customscore=customscorefunction(state_exact,...other attributes)&sort=product(customscore*score)
还有其他有效的方法吗? 哪种方法是正确的?你知道吗
具体来说,我有大约10-15个过滤器,并假设这些过滤器不会改变经常。还有我的应用程序使用python和django作为框架?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐