You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Redis DB
Hi Experts,
We are moving our metadata from hash to sorted set to support expiry of fields in hash.
We wanted to understand if there's any easy way/command to copy data between these 2 different data-structures.
Thanks,
Ankit
Ankit Gupta
unread,
Oct 13, 2021, 12:18:18 PM10/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Redis DB
We are using redis version 5.0.5
Greg Andrews
unread,
Oct 17, 2021, 2:06:21 AM10/17/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Redis DB
Redis doesn't have a built-in conversion command from a hash to a sorted set, so you'll have to write a script to do that. I imagine you'll have to change your client code to handle the different commands for reading/writing a sorted set rather than a hash, so you'll already be coordinating an explicit change and not trying to change the hashes while clients are actively using them. So a script to convert each hash -> sorted-set ought to be fairly simple.
Ankit Gupta
unread,
Oct 18, 2021, 11:28:09 AM10/18/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to redi...@googlegroups.com
Thank you for the reply Greg.
Thanks & Regards,
Ankit Gupta
+91 965 427 1456