The same way as the Filters section, the Aggregations section as DynamicAggregationType to hold all types of Aggregations.
It has an abstract class DynamicAgg which is being used as the base of every specific aggregation. It has an output to the UI, that's why it has a DynamicAggUI class with exclusive options regarding UI.
Anchor | ||||
---|---|---|---|---|
|
Property | Description | Default | Type | Required |
---|---|---|---|---|
type | Aggregation type | string | Yes | |
field | Name of the field from which the values will be aggregated | string | Yes | |
negated | Negates the filter | false | boolean | No |
must | Indicates if the filter must be enforced alongside other filters, or if it can be omitted if it doesn't match (acts as a should) | true | boolean | No |
post_search | Is filter multiselect? Warning: for multiselect filter, the process is done post search | false | boolean | No |
id | Name for which to identify the aggregation done | string (pattern: \w) | Yes | |
or_selection | Indicates the behavior between 2 selections of the same aggregation. If true, selections will be treated as "or" (e.g., A or B). If false, they will be treated as "and" (e.g., A and B) | true | boolean | No |
ui_only | Section dedicated for UI transformation options only. Not required for regular aggregation process | object | No | |
aggs | Nested Aggregations. Define a list of nested aggregations | array | No |
Info |
---|
The type property should be one of the following values: "term", "bool", "date_histogram", "histogram", "browse", "date_range", "range", "slider", "top_hits", or "filter". |
Property | Description | Default | Type | Required |
---|---|---|---|---|
display_name | Please use for UI display | 'Display Name' | str | Yes |
hide_count | Hides the count of the aggregation. Useful for multi-select aggregations. | False | bool | Yes |
translate | Set the description prefix for its values. (e.g main.agg.types.<value_of_agg>) | None | Optional[str] | No |
expanded | If the UI component is collapsible, indicates if it is expanded or not | True | bool | Yes |
Property | Description | Default | Type | Required |
---|---|---|---|---|
id | Name for which to identify the aggregation done | 'Aggregation Id' | str (regex: '\w') | Yes |
negated | List of values or ranges for exclusion filtering | None | List[Any] | No |
values | List of values or ranges for inclusion filtering | None | List[Any] | No |
level | Level of Deepness for histograms configuration | 0 | int | No |
ResponseAgg
Property | Description | Default | Type | Required |
---|---|---|---|---|
id | Unique identifier for the returned aggregation | str (alias: '_id') | Yes | |
entries | Each individual value for an aggregation | []None | list[AggEntry, Any] | No |
AggEntry
Property | Description | Default | Type | Required |
---|---|---|---|---|
count | The count of the aggregation entry | 0 | int | No |
aggs | A list of nested ResponseAgg objects, or None | None | Union[List[ResponseAgg], None] | No |