You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-07-31 05:44:24 +03:00
fix(search): align ft.search with server (#2988)
as per the ft.search docs ( https://redis.io/docs/latest/commands/ft.search ): If a relevant key expires while a query is running, an attempt to load the key's value will return a null array. However, the key is still counted in the total number of results. So, instead of crashing when seeing a null as a value, we return empty object. fixes #2772 see https://github.com/redis/node-redis/pull/2814
This commit is contained in:
committed by
GitHub
parent
b33a662e50
commit
2bb515e489
@ -221,6 +221,10 @@ export interface SearchReply {
|
||||
function documentValue(tuples: any) {
|
||||
const message = Object.create(null);
|
||||
|
||||
if(!tuples) {
|
||||
return message;
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
while (i < tuples.length) {
|
||||
const key = tuples[i++],
|
||||
|
Reference in New Issue
Block a user