Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
DynamicAgg
DynamicAgg
DynamicAgg

PropertyDescriptionDefaultTypeRequired
typeAggregation type
stringYes
fieldName of the field from which the values will be aggregated
stringYes
negatedNegates the filterfalsebooleanNo
mustIndicates if the filter must be enforced alongside other filters, or if it can be omitted if it doesn't match (acts as a should)truebooleanNo
post_searchIs filter multiselect? Warning: for multiselect filter, the process is done post searchfalsebooleanNo
idName for which to identify the aggregation done
string (pattern: \w)Yes
or_selectionIndicates 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)truebooleanNo
ui_onlySection dedicated for UI transformation options only. Not required for regular aggregation process
objectNo
aggsNested Aggregations. Define a list of nested aggregations
arrayNo
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".

DynamicAggUI

PropertyDescriptionDefaultTypeRequired
display_namePlease use for UI display'Display Name'strYes
hide_countHides the count of the aggregation. Useful for multi-select aggregations.FalseboolYes
translateSet the description prefix for its values. (e.g main.agg.types.<value_of_agg>)NoneOptional[str]No
expandedIf the UI component is collapsible, indicates if it is expanded or notTrueboolYes



Image RemovedImage Added

Image RemovedImage Added

SelectionAgg

PropertyDescriptionDefaultTypeRequired
idName for which to identify the aggregation done'Aggregation Id'str (regex: '\w')Yes
negatedList of values or ranges for exclusion filteringNoneList[Any]No
valuesList of values or ranges for inclusion filteringNoneList[Any]No
levelLevel of Deepness for histograms configuration0intNo


ResponseAgg

PropertyDescriptionDefaultTypeRequired
idUnique identifier for the returned aggregation
str (alias: '_id')    Yes
entriesEach individual value for an aggregation[]list[AggEntry, Any]No


AggEntry

PropertyDescriptionDefaultTypeRequired
countThe count of the aggregation entry0intNo
aggsA list of nested ResponseAgg objects, or NoneNoneUnion[List[ResponseAgg], None]No