问题描述
是否有可能对弹性搜索进行查询,以最高分数的百分比返回分数?到目前为止,它返回一个值,例如_ score:0.00786336,
,最大分数如 max_score:0.13435546
所以我可以尝试转换我的结果,但我希望结果已经达到百分比,所以我可以使用最低分,例如40%。
$ b简而言之:有没有办法以最高分数的百分比获得_score,还是设置最小分数的另一种方法?(似乎很难,因为max_score似乎是随机的)
一种方法是存储查询散列和min_score(以最大分数计算),例如,如果max_score是1.1,该查询的min_score可以为0.44,这有助于切断不相关的结果。
Is it possible to make a query for Elastic Search that returns a score as a percentage of the maximum score? Until now it returns a value like "_score": 0.00786336,
and also a maximum score like max_score": 0.13435546
, so I could try to convert my result but I want the result to be already in percentages, so I could use a minimum score, for example of 40 percent.
In short: Is there a way to get the _score in percentages of the max score, or is there another way of setting a minimum score? (seems to be hard because the max_score seems random)
One way to do it can be to store the query hashes and the min_score (calculated as a percentage of max score). For example if the max_score is 1.1 the min_score can be 0.44 for that query which can help cut off irrelevant results.
这篇关于弹性搜索:得分为百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!