经过广泛搜索并遇到诸如此类的答案 -
我仍然无法解决以下问题:
如何使用文档的"得分"字段创建新的评分函数并相应地对结果进行排名.像这样的东西 -
new_score =得分*my_other_field
当前查询 -
http://localhost:8984/solr/suggest_new/select?q=tom&wt=json&indent=true&bq=_val_:"product(score,count_of_searches)"
Run Code Online (Sandbox Code Playgroud)
这是我在Elasticsearch中所做的事情 -
"script_score" : {
"script" : "_score * doc['my_numeric_field'].value"
}
Run Code Online (Sandbox Code Playgroud)
请帮助/指出正确的链接.非常感谢 !(注:Solr版本:4.10.4)
在Solr中,我可以使用query函数查询返回查询的数字分数,我可以在bf参数的上下文中使用它bf=product(query('cat'),query('dog'))来将两个相关性分数相乘.
Elasticsearch的搜索API通常更灵活,但我无法弄清楚如何实现同样的壮举.我可以_score在function_query的script_function中使用,但我只能使用_score主查询.如何合并其他查询的分数?我怎样才能将得分相乘?