[英]Modifying relevance score in elasticsearch using results from another query
A project I am working on utilizes elasticsearch as a search engine. 我正在研究的项目利用Elasticsearch作为搜索引擎。 I also am using a graph database to keep track of user actions and the relationships between queries, clicks, etc.
我还使用图形数据库来跟踪用户操作以及查询,点击等之间的关系。
What I want to do is index queries and their top results from the graph database into elasticsearch, so at query time, I can boost the elasticsearch _score by the score provided by the graph database. 我想要做的是将索引查询及其从图形数据库中获得的最佳结果转换为elasticsearch,因此在查询时,我可以通过图形数据库提供的分数来提高elasticsearch _score。 Is this possible in elasticsearch itself?
弹性搜索本身有可能吗? Or do I need to do the boosting externally?
还是我需要在外部进行提升?
If i understad your problem, you have your primary results comming from another source (graph DB) and that score is highly dependent of every query as it is with Elasticsearch. 如果我不太了解您的问题,那么您的主要结果来自其他来源(图形数据库),并且该分数与Elasticsearch一样,在很大程度上取决于每个查询。 Script score functions in ES are not suited for this task, as you have limited parameters to pass to it besides accessing all indexed document's fields.
ES中的脚本评分功能不适合此任务,因为除了访问所有索引文档的字段之外,传递给它的参数有限。 So the only choices I can see are:
因此,我只能看到的选择是:
boost the elasticsearch _score by the score
通过分数提高elasticsearch _score
You can boost the score of the documents during elasticsearch query using the function score query . 您可以使用功能得分查询在Elasticsearch查询期间提高文档的得分 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.