Statistics aggregations in algolia

☆樱花仙子☆ 提交于 2020-01-15 03:36:05

问题


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

An example of what I want to do is this:

  • When a user searches, I show in real time the results of an aggregation on that query as well, such as a count of everything matching a particular filter (e.g. count of all the red items, blue items, yellow items etc)

回答1:


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 will compute the counts associated to each faceted value and provides you a way to filter on those values.

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.



来源:https://stackoverflow.com/questions/36929609/statistics-aggregations-in-algolia

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!