本文介绍了使用ElasticSearch在每个聚合中包含文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个要求,准备搜索结果(从服务器)的UI,以显示类似于页面。基本上一个等价的数据库是 group by queries including 。

Have a requirement to prepare search result (from server) in a way for UI to display something like shown on this page. basically a database equivalent is group by queries including average aggregation for one or more of the sub-groupings.

很明显,很显然,弹性搜索不支持通过聚合功能返回的文档,这是由和的帖子。

Apparently it's clear that Elastic Search doesn't have support for returning documents with aggregation feature which was confirmed by this and this post.

在将弹性搜索与Solr进行比较时,弹性搜索的原因之一是,包括嵌套聚合和各种其他丰富聚合(包括最小,最大,平均,总和,百分位数等) 。根据需求在每个聚合中实现结果(文档)最好的服务器端解决方法是什么?

while comparing elastic search with Solr one of the reasons to go with Elastic Search was it's advanced aggregation features, including nested aggregations and variety of other rich aggregations (including min,max,avg,sum,percentile etc). Given the requirement on hand what's the best server side workaround for achieve results(documents) in each aggregation?

推荐答案

检查最新版本,它包含顶级命中聚合。这可能是你正在寻找的

Check the latest release, it contains the top hits aggregation. This might be what you are looking for

这篇关于使用ElasticSearch在每个聚合中包含文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 08:05