Skip to content

Commit 70872d8

Browse files
committed
fix for a453114 - fix FT.SEARCH
1 parent a453114 commit 70872d8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/search/lib/commands/SEARCH.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe('SEARCH', () => {
199199
it('with SORTBY', () => {
200200
assert.deepEqual(
201201
transformArguments('index', 'query', { SORTBY: '@by' }),
202-
['FT.SEARCH', 'index', 'query', 'SORTBY', '1', '@by']
202+
['FT.SEARCH', 'index', 'query', 'SORTBY', '@by']
203203
);
204204
});
205205

packages/search/lib/commands/SEARCH.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
22
import { pushOptionalVerdictArgument, pushVerdictArgument, transformReplyTuples } from '@node-redis/client/dist/lib/commands/generic-transformers';
3-
import { RedisSearchLanguages, PropertyName, pushSortByArguments, SortByOptions } from '.';
3+
import { RedisSearchLanguages, PropertyName, pushSortByProperty, SortByOptions } from '.';
44

55
export const FIRST_KEY_INDEX = 1;
66

@@ -150,7 +150,8 @@ export function transformArguments(
150150
// }
151151

152152
if (options?.SORTBY) {
153-
pushSortByArguments(args, 'SORTBY', options.SORTBY);
153+
args.push('SORTBY');
154+
pushSortByProperty(args, options.SORTBY);
154155
}
155156

156157
// if (options?.MSORTBY) {

0 commit comments

Comments
 (0)