Aggregated records allow you to group records by dimension or property values.
By configuring aggregated records, you enable the MDEX Engine to handle a group of multiple records as though it were a single record, based on the value of the rollup key. A rollup key can be any property or dimension that has its rollup attribute enabled.
You can use parent-child data source relationships to create multiple data sources with different aggregations. The parent data source can use base records, while multiple child data sources each aggregate by a different rollup key.
For details on how individual components handles record aggregation, see the Discovery Framework Component Catalog.
To configure a data source for aggregated records, you include the RecordAggregator QueryFunction class in the data source's JSON configuration file. The RecordAggregator contains two configuration properties:rollupKey and aggCount.
The rollupKey property is used to specify the dimension or property by which records in a navigation object's record list should be aggregated.
If no aggCount value is set, the default is ONE_EREC_PER_AGGR.
In the following example data source configuration file, the P_Winery property is the rollup key, and one of the records that composes the aggregated record will be returned.
{ "server":"server01.lab.acme.com", "port":"15000", "baseFunctions": [ {"class":"com.endeca.portal.data.functions.RecordAggregator", "rollupKey":"P_Winery", "aggCount":"ONE_EREC_PER_AGGR" } ] }