XML Configuration Reference : Search : Aggregation
 
Aggregation
com.exalead.search.v30.Aggregation
Combines the values of the specified expr for all the hits of the group and output the value to the specified meta. For example, if you have hits:
H1 with values: sort_field=100, group_field=12, value_field=57
H2 with values: sort_field=50, group_field=12, value_field=23
With a sort by sort_field and a group by group_field, the GroupBy will only keep the hit H1 because its sort_field has the best value.
with a function on value_field of type "MIN", the value of value_field in the grouped hit will be 23 (minimum value over grouped hits)
with a function on value_field of type "MAX", the value of value_field in the grouped hit will be 57 (maximum value over grouped hits)
with a function on value_field of type "SUM", the value of value_field in the grouped hit will be 80 (sum of values for grouped hits)
with a function on value_field of type "AVG", the value of value_field in the grouped hit will be 40 (average of values for grouped hits)
Parent elements:
com.exalead.search.v30.GroupConfig (as GroupConfig)
Attributes:
Name
Type
Default value
Description
expr
string
Field to compute on the grouped hits.
aggregationField
string
function
enum(AVG, MAX, MIN, SUM, STDDEV, CONCAT)
MAX
Aggregation function to apply on the specified expression.
MIN/MAX use the lowest/highest value of all hits in the group
SUM adds the values of all hits in the group
AVG calculates the mean of values of all hits in the group
STDDEV calculates the standard deviation of values of all hits in the group
CONCAT joins all the values from all the hits in the group. Only works with alphanumerical values.
separator
string
Character to separate concatenated strings.