阿尔及利亚的统计汇总 [英] Statistics aggregations in algolia
问题描述
我正在浏览Algolia的文档,找不到与在elasticsearch中进行聚合有关的任何内容: https://www.elastic.co/guide/zh-CN/elasticsearch/reference/current/search-aggregations.html
I was looking through the documentation for Algolia and could not find anything related to doing aggregations like you can in elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html
我想做的一个例子是:
- 当用户搜索时,我会实时显示该查询的汇总结果,例如与特定过滤器匹配的所有内容的计数(例如,所有红色项,蓝色项,黄色项等的计数)
推荐答案
ES所谓的聚合实际上是Algolia提供的方面的子集(请参见 https://www.algolia.com/doc/search/filtering-faceting#faceting )。您可以使用 term
聚合在ES中实现Algolia构面功能。
What ES calls "aggregations" is actually a subset of the "facets" that Algolia provides (see https://www.algolia.com/doc/search/filtering-faceting#faceting). The Algolia faceting capabilities is what you can achieve in ES using the term
aggregation.
Faceting将计算相关计数
Faceting will compute the counts associated to each faceted value and provides you a way to filter on those values.
由于Algolia经过高度优化和设计,可按需输入全文搜索,因此,引擎不提供深度聚合功能。您唯一获得的汇总是最小
,最大
,平均
如果基础构面值为数字。
Since Algolia has been highly optimized and designed for as-you-type full-text search, the engine doesn't provide deep aggregation capabilities. The only aggregation you would get is the min
, max
, avg
values if the underlying facet values are numbers.
这篇关于阿尔及利亚的统计汇总的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!