AggregateFilter#
- class AggregateFilter(config)#
Bases:
Filter
The aggregate
Filter
concatenates / sums up the field values of the aggregated_fields grouped by the value of the aggregating_fieldInput - the aggregated_fields need to be of type
int
,float
orlist
Output - the output field is filled with data of type
int
,float
orlist
according to the type of the aggregated_fields- Parameters:
type (str) – aggregate
aggregated_fields (list) – Fields to aggregate
aggregating_field (str) – Field to aggregate into
output_field (str, None) – Field to store the aggregation (defaults to aggregating_field)
use_separate_docs (bool, True) – Whether or not to use a separate doc for each aggregating value
Example
{ "step": "filter", "type": "aggregate", "output_field": "out", "aggregated_fields": ["b", "c"], "aggregating_field": "a", }
Methods Summary
Methods Documentation
- process(docs)#
Process a set of documents