public class Reducers
extends java.lang.Object
| Constructor and Description |
|---|
Reducers() |
| Modifier and Type | Method and Description |
|---|---|
static Reducer |
avg(java.lang.String field) |
static CollectReducer |
collect()
REDUCE COLLECT — gather per-document projections within a GROUPBY group.
|
static Reducer |
count_distinct(java.lang.String field) |
static Reducer |
count_distinctish(java.lang.String field) |
static Reducer |
count() |
static Reducer |
first_value(java.lang.String field) |
static Reducer |
first_value(java.lang.String field,
SortedField sortBy)
REDUCE FIRST_VALUE {nargs} {property} [BY {property} [ASC|DESC]]
|
static Reducer |
max(java.lang.String field) |
static Reducer |
min(java.lang.String field) |
static Reducer |
quantile(java.lang.String field,
double percentile) |
static Reducer |
random_sample(java.lang.String field,
int size) |
static Reducer |
stddev(java.lang.String field) |
static Reducer |
sum(java.lang.String field) |
static Reducer |
to_list(java.lang.String field) |
public static Reducer count()
public static Reducer count_distinct(java.lang.String field)
public static Reducer count_distinctish(java.lang.String field)
public static Reducer sum(java.lang.String field)
public static Reducer min(java.lang.String field)
public static Reducer max(java.lang.String field)
public static Reducer avg(java.lang.String field)
public static Reducer stddev(java.lang.String field)
public static Reducer quantile(java.lang.String field, double percentile)
public static Reducer first_value(java.lang.String field)
public static Reducer first_value(java.lang.String field, SortedField sortBy)
field - sortBy - public static Reducer to_list(java.lang.String field)
public static Reducer random_sample(java.lang.String field, int size)
@Experimental public static CollectReducer collect()
Returns a CollectReducer builder; configure projected fields via
fields(...) or
fieldsAll(), then optionally chain
sortBy(...) and
limit(...) before calling Reducer.as(String).
Experimental. Both the underlying Redis Search feature and this API may change.
Before issuing COLLECT queries the server must be configured with
CONFIG SET search-enable-unstable-features yes; otherwise the server returns
SEARCH_QUERY_BAD `COLLECT` is unavailable when `ENABLE_UNSTABLE_FEATURES` is off.
CollectReducerCopyright © 2026. All rights reserved.