使用Solr构建基于属性的推荐

时间:2016-12-16 05:00:57

标签: python django search solr recommendation-engine

我需要将用户属性与solr字段匹配,并计算累积分数并根据该自定义分数检索文档。

阅读完文档后,我找到了几种方法来完成这项任务

1)使用Python构建函数查询,然后检索其响应    示例:if state ==“Uttar Pradesh”then 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作为框架?

0 个答案:

没有答案