Note. I assume you meant sadd disabled two
As you found out, SDIFF does not work on sorted sets, because determining the difference between sorted sets is not trivial.
What you can do is first create a temporary set with ZUNIONSTORE and set the intersection values ββto 0. Then do a range excluding 0, for example:
127.0.0.1:6379> ZADD all 1 one 2 two 3 three (integer) 3 127.0.0.1:6379> SADD disabled two (integer) 1 127.0.0.1:6379> ZUNIONSTORE tmp 2 all disabled WEIGHTS 1 0 AGGREGATE MIN (integer) 3 127.0.0.1:6379> ZREVRANGEBYSCORE tmp +inf 1 WITHSCORES 1) "three" 2) "3" 3) "one" 4) "1"
source share