Redis
 SQL >> Datenbank >  >> NoSQL >> Redis

Differenz zweier Sorted Sets Redis

SDIFF funktioniert nicht für ZSET. Workaround:

ZADD all 1 one 2 two 3 three
SADD disabled two
ZUNIONSTORE tmp 2 all disabled WEIGHTS 1 0 AGGREGATE MIN
ZREVRANGEBYSCORE tmp +inf 1 WITHSCORES

Ergebnis ohne Score 0.