There is a command in Redis - SCAN. It has an option TYPE which return objects that match a given type. When I try to run the set of commands which is provided in the example https://redis.io/commands/scan#the-type-option I get an error ERR syntax error when I run the last command SCAN 0 TYPE zset.
I have prepared objects with the list and zset types, but neither of them works, I always get an exception. Even if I add something on my own, it does not work.
My question is next. Does SCAN actually support TYPE option? I found this issue https://github.com/antirez/redis/issues/3323, but it's not closed and on Redis docs there are such details
Redis version:
redis> INFO
# Server
redis_version:5.0.5
redis> RPUSH list_object "list_element"
redis> TYPE list_object
list
redis> ZADD zset_object 1 "zset_element"
redis> TYPE zset_object
zset
redis> SCAN 0 TYPE zset
ERR syntax error
redis> SCAN 0 type list
ERR syntax error