1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

fix #1749 - FT.SEARCH SORTBY

This commit is contained in:
leibale
2021-11-30 19:10:06 -05:00
parent 533dce0bc9
commit 592714fb00

View File

@@ -48,8 +48,8 @@ interface SearchOptions {
SCORER?: string; SCORER?: string;
// EXPLAINSCORE?: true; // TODO: WITHSCORES // EXPLAINSCORE?: true; // TODO: WITHSCORES
// PAYLOAD?: ; // PAYLOAD?: ;
// SORTBY?: SortByOptions; SORTBY?: SortByOptions;
MSORTBY?: SortByOptions | Array<SortByOptions>; // MSORTBY?: SortByOptions | Array<SortByOptions>;
LIMIT?: { LIMIT?: {
from: number | string; from: number | string;
size: number | string; size: number | string;
@@ -149,15 +149,14 @@ export function transformArguments(
// args.push('PAYLOAD', options.PAYLOAD); // args.push('PAYLOAD', options.PAYLOAD);
// } // }
// if (options?.SORTBY) { if (options?.SORTBY) {
// args.push('SORTBY'); pushSortByArguments(args, 'SORTBY', options.SORTBY);
// pushSortByArguments(args, options.SORTBY);
// }
if (options?.MSORTBY) {
pushSortByArguments(args, 'MSORTBY', options.MSORTBY);
} }
// if (options?.MSORTBY) {
// pushSortByArguments(args, 'MSORTBY', options.MSORTBY);
// }
if (options?.LIMIT) { if (options?.LIMIT) {
args.push( args.push(
'LIMIT', 'LIMIT',