Issue
code
client.ft.SEARCH('license-index-json',"@\\$\\" + ".reservedForApplicationName:GSTest",{
LIMIT: {
from: 0,
to: 1
}
})
Error
Argument of type '["license-index-json", string, { LIMIT: { from: number; to: number; }; }]' is not assignable to parameter of type '[index: string, query: string, options?: SearchOptions] | [options: CommandOptions, index: string, query: string, options?: SearchOptions]'.
Type '["license-index-json", string, { LIMIT: { from: number; to: number; }; }]' is not assignable to type '[options: CommandOptions, index: string, query: string, options?: SearchOptions]'.
Type at position 0 in source is not compatible with type at position 0 in target.
Type 'string' is not assignable to type 'CommandOptions'.
Type 'string' is not assignable to type '{ readonly [symbol]: true; }'.ts(2345)
Solution
https://github.com/redis/node-redis/blob/master/packages/search/lib/commands/SEARCH.ts
use from
and size
, not from
and to
client.ft.SEARCH('idx', 'query', {
LIMIT: {
from: 0,
size: 1
}
});
Answered By - Leibale Eidelman Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.