node.js - 如何在 Redis 中搜索基于 Json 字符串的值?

标签 node.js redis

我目前正在从事一个使用 NodeJs 中的 Redis 的项目,并且大量数据以 JSON 字符串的形式存储在 Redis 中。我有很多键,即

 urn:comment:1, urn:comment:2 etc and the values contained are:

"{Id:1, CommentText:"some text here that could be quite large..." ...} etc

我需要的是一种在“CommentText”中搜索字符串的方法。

我是 Redis 的新手,我有哪些选择?

最佳答案

Redis 不太适合你想要的东西。 由于您需要全文搜索功能,我强烈建议您使用 Elastic Search elasticsearch.org

关于node.js - 如何在 Redis 中搜索基于 Json 字符串的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13919302/

相关文章:

javascript - 如何使用 React Native 中的 React Native 元素库中的复选框从平面列表中选择多个项目?

node.js - 为什么restify没有自己的插件来支持cookie?

java - 使用jedis如何缓存Java对象

javascript - 在 Meteor.js 上返回多个游标

javascript - "msg":"Error parsing JSON field value. 意外的 OBJECT_START

node.js - 撇号 cms 中图像的默认值?

lua - 如何使用 Redis lua 脚本调用具有不同参数的不同命令

Redis 存储没有值的键

Spring 集成 Redis RPOPLPUSH

redis - 排序集不根据 Redis 中的键更新值