【发布时间】:2021-05-17 16:39:12
【问题描述】:
我在 redis 中将我的数据设置为像这样的键值对
let data = [{key: 'a-9' , val: 'a'}, {key: 'a-7', val: 'b'}, {key: 'b-8', val: 'c'}]
并希望根据这样的条件取回数据
所有大于或等于 9 的 'a' 键
client.hgetAsync("class_cache", "a").then(res => {
callback(null, res);
}).catch(err => {
console.error(err)
}).finally(() => {
client.quit();
});
谁能帮忙?
【问题讨论】:
-
你检查Redis模块redisearch.io了吗?
标签: node.js redis node-redis