GroupByRange groups query results by range. You can use this aggregation method to group query results based on range. The values that are the same are grouped together. The identical value of each group and the number of identical values in each group are returned.
Request parameters
message GroupByRange {
optional string field_name = 1;
repeated Range ranges = 2;
optional Aggregations sub_aggs = 3;
optional GroupBys sub_group_bys = 4;
}
Parameter | Type | Required | Description |
field_name | string | Yes | The field that is used for aggregation. |
ranges | repeated Range | Yes | The range of the group. The range is a left-closed and right-open interval. |
sub_aggs | No | The sub-aggregation operation that is performed on the grouping results. | |
sub_group_bys | No | The sub-GroupBy operation that is performed on the grouping results. |
Response parameters
message GroupByRangeResult {
repeated GroupByRangeResultItem group_by_range_result_items = 1;
}
Parameter | Type | Required | Description |
group_by_range_result_items | repeated GroupByRangeResultItem | Yes | The information about groups returned. |