You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fix for a45311416d
- fix FT.SEARCH
This commit is contained in:
@@ -199,7 +199,7 @@ describe('SEARCH', () => {
|
|||||||
it('with SORTBY', () => {
|
it('with SORTBY', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('index', 'query', { SORTBY: '@by' }),
|
transformArguments('index', 'query', { SORTBY: '@by' }),
|
||||||
['FT.SEARCH', 'index', 'query', 'SORTBY', '1', '@by']
|
['FT.SEARCH', 'index', 'query', 'SORTBY', '@by']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
|
import { RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
|
||||||
import { pushOptionalVerdictArgument, pushVerdictArgument, transformReplyTuples } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
import { pushOptionalVerdictArgument, pushVerdictArgument, transformReplyTuples } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||||
import { RedisSearchLanguages, PropertyName, pushSortByArguments, SortByOptions } from '.';
|
import { RedisSearchLanguages, PropertyName, pushSortByProperty, SortByOptions } from '.';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
@@ -150,7 +150,8 @@ export function transformArguments(
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if (options?.SORTBY) {
|
if (options?.SORTBY) {
|
||||||
pushSortByArguments(args, 'SORTBY', options.SORTBY);
|
args.push('SORTBY');
|
||||||
|
pushSortByProperty(args, options.SORTBY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (options?.MSORTBY) {
|
// if (options?.MSORTBY) {
|
||||||
|
Reference in New Issue
Block a user