You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
add addscores to aggregate search command (#2799)
* add addscores to aggregate search command * change `true` to `boolean` --------- Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
@@ -119,7 +119,8 @@ type LoadField = PropertyName | {
|
||||
}
|
||||
|
||||
export interface AggregateOptions {
|
||||
VERBATIM?: true;
|
||||
VERBATIM?: boolean;
|
||||
ADDSCORES?: boolean;
|
||||
LOAD?: LoadField | Array<LoadField>;
|
||||
STEPS?: Array<GroupByStep | SortStep | ApplyStep | LimitStep | FilterStep>;
|
||||
PARAMS?: Params;
|
||||
@@ -150,6 +151,10 @@ export function pushAggregatehOptions(
|
||||
args.push('VERBATIM');
|
||||
}
|
||||
|
||||
if (options?.ADDSCORES) {
|
||||
args.push('ADDSCORES');
|
||||
}
|
||||
|
||||
if (options?.LOAD) {
|
||||
args.push('LOAD');
|
||||
pushArgumentsWithLength(args, () => {
|
||||
@@ -308,4 +313,4 @@ export function transformReply(rawReply: AggregateRawReply): AggregateReply {
|
||||
total: rawReply[0],
|
||||
results
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user