我正在使用elasticsearch进行一项研究。我计划使用余弦相似度,但我注意到它不可用,相反,我们使用BM25作为默认评分函数。
这有什么原因吗?余弦相似度是否不适合查询文档?为什么选择BM25作为默认值?谢谢
发布于 2019-03-15 14:26:28
长期使用的elasticsearch使用TF/IDF算法来查找查询中的相似度。但之前的版本更改为BM25,效率更高。您可以在the documentation中阅读相关信息。And good article explains what is elastic search and how to the similarity in ES。
您还可以向elasticsearch编写自定义算法。Here a good article about how to do。
https://stackoverflow.com/questions/55174358
复制相似问题