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 FT.SEARCH RETURN [] (#2421)
* ref #2419 - fix FT.SEARCH RETURN [] * fix transformReply * fix PROFILE SEARCH as well * fix PROFILE SEARCH preserve * move preserve login to `pushSearchOptions` * attach preserve only if true * fix RETURN: [] test
This commit is contained in:
@@ -9,7 +9,7 @@ export function transformArguments(
|
||||
query: string,
|
||||
options?: ProfileOptions & SearchOptions
|
||||
): RedisCommandArguments {
|
||||
const args = ['FT.PROFILE', index, 'SEARCH'];
|
||||
let args: RedisCommandArguments = ['FT.PROFILE', index, 'SEARCH'];
|
||||
|
||||
if (options?.LIMITED) {
|
||||
args.push('LIMITED');
|
||||
@@ -21,9 +21,9 @@ export function transformArguments(
|
||||
|
||||
type ProfileSearchRawReply = ProfileRawReply<SearchRawReply>;
|
||||
|
||||
export function transformReply(reply: ProfileSearchRawReply): ProfileReply {
|
||||
export function transformReply(reply: ProfileSearchRawReply, withoutDocuments: boolean): ProfileReply {
|
||||
return {
|
||||
results: transformSearchReply(reply[0]),
|
||||
results: transformSearchReply(reply[0], withoutDocuments),
|
||||
profile: transformProfile(reply[1])
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user