I have a question, is it possible to create a LIKE
operator search in Redis? Similar to relational (mysql/oracle) database.
I have complex json:
{"_id" : ObjectId("581c8b8854fdcd1ff8c944e0"),
"Objectcode" : "xxxxx",
"Objecttype" : "xxxx",
"docid" : "581c8b8554fdcd1ff8c93d10",
"description" : "Tags based search .... ",
"metaTags" : [
"tag1",
"tag2",
"tag3",
"tag5",
"tag6",
"tag7",
"tag8",
"tag9",
"tag10"
],
"__v" : 0
}
and i want to search on array of metaTags how can i do it?
Thanks
You can use MATCH commands to search data.
Refer: http://redis.io/commands/scan
You can use Redis *SCAN commands http://redis.io/commands/scan, depending of your type of data to filter by a pattern:
Never use KEYS in app code, because it may ruin performance.
The two major nodejs redis client libraries node_redis and ioredis support it, with some syntax sugar: