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