aggregate_cardinality
The function(str agg_name, str fieldname)
returns the number documents that passed the relevant filtering.
The aggregation result will be stored under the query results objects, under a key named "agg_name"
.
Input
agg_name(str) - Specifies the key that will be used to store the aggregation result under the query result.
fieldname(str) - The name of the field to aggregate. params[fieldname]must be of type keyword or list[keyword].
Example:
In the above example, the query results will include a key name 'aggregations', containing the following sub keys:
“cardinality_langauges” - the cardinality of the field "languages" over all candidates that passed the filter over genres.
"cardinality_genres_languages" - the cardinality of the field "languages" over all candidates that passed the filter over genres and languages.
Last updated