如何对文档动态派生属性的弹性查询结果进行评分

问题描述 投票:0回答:0

我有一个关于信息检索模式的问题。

我的搜索集群中有将近 1000 万份这样的文档

    {
   "id":"7ftCdTQAAAAJ",
   "authors":[
      {
         "name":"Makoto Satoh",
         "org":"Shinshu University",
         "id":2312688602
      }
   ],
   "title":"Preliminary Design of a Network Protocol Learning Tool Based on the Comprehension of High School Students: Design by an Empirical Study Using a Simple Mind Map",
   "abstract":"Preliminary Design of a Network Protocol Learning Tool Based on the Comprehension of High School Students: Design by an Empirical Study Using a Simple Mind Map Preliminary Design of a Network Protocol Learning Tool Based on the Comprehension of High School Students: Design by an Empirical Study Using a Simple Mind Map",
   "year":2013,
   "n_citation":1,
   "doc_type":"Conference",
   "publisher":"Springer, Berlin, Heidelberg",
   "volume":"",
   "issue":"",
   "references":[
      2005687710,
      2018037215
   ]
}

我想设计一个系统,通过 h-index 返回前 k 个作者,给定查询可能类似于*网络协议学习工具的热门书籍* 仅供参考 H-Index 是计算作者有效性的分数更多信息可用这里

如何根据引用次数计算 H 指数在这里

一种方法是按作者组获取搜索查询中的所有匹配文档,获取所有作者的所有引用并按引用次数排序,计算 h-index,然后根据 h-index 分数对所有结果进行排序。这种方法非常慢

我们想到了两种替代方法

1:我们尝试将所有作者的 h-index 存储在文档上,但是由于作者与文章的 1:M 关系,新文档的索引会非常频繁,这将导致非常频繁的更新操作。

2:我们可以有一个二级索引来存储作者每次批量插入的 H-Index 分数,并使用两个查询来传递结果。

我的问题是我们如何优化此类查询操作,从我了解 Elasticsearch 的“script_score”功能的文档中。但是在我的用例中,我需要获取作者的所有文章,然后计算所有匹配作者的 h-index 分数,包括最近索引的文档。

有人可以建议你们如何解决这些问题吗,elasticsearch 中是否有任何内置的信息检索模式以插件的形式可以在这种情况下使用。

写一个插件可能是解决方案,但是没有太多关于写插件的文档。

也许另一种解决方案是使用 painless 实现 h-index 计算算法?

任何建议都会有所帮助,提前致谢

elasticsearch search solr full-text-search information-retrieval
© www.soinside.com 2019 - 2024. All rights reserved.