ExAliyunOts.Search.agg_count

You're seeing just the function agg_count, go back to ExAliyunOts.Search module for more information.
Link to this function

agg_count(aggregation_name, field_name)

View Source

Specs

agg_count(aggregation_name(), field_name()) :: map()

Calculate the count of the assigned field by aggregation in the nested :aggs option of :search_query option in ExAliyunOts.search/4.

Official document in Chinese | English

Example

import MyApp.TableStore

search "table", "index_name",
  search_query: [
    query: ...,
    aggs: [
      agg_sum("agg_name", "score")
    ]
  ]

The aggregation_name can be any business description string, when get the calculated results, we need to use it to fetch them.

If the field is not existed in a row of data, then this row does not participate in the statistics of count.