ZREM

Redis 開発者教育の申込 Redis 定期点検/技術サポート
Redis Technical Support
Redis エンタープライズサーバー
Redis Enterprise Server

member の削除

使い方は zrem key member です。
member を複数指定できます。

Example

コマンド>zadd mycom  2009 "Sun microsystems" 1992 Wang 2002 Netscape
結果>3
コマンド>zadd mycom  1998 "Digital Equipment" 2005 K-mart 1987 "American motors"
結果>3
コマンド>zrange mycom 0 -1 withscores
結果> 0) 1987 -> American motors
1) 1992 -> Wang
2) 1998 -> Digital Equipment
3) 2002 -> Netscape
4) 2005 -> K-mart
5) 2009 -> Sun microsystems
コマンド>zrem mycom "American motors" "Wang" "Digital Equipment"
結果>3
コマンド>zrange mycom 0 -1 withscores
結果> 0) 2002 -> Netscape
1) 2005 -> K-mart
2) 2009 -> Sun microsystems

アニメーションを見る



構文

ZREM key member [member]

  • このコマンドは version 1.2.0 から使用できます。
  • 時間計算量は O(M*log(N)) です。 N は集合に属する member 個数で、 M は削除される member 個数です。
  • version 2.4 以降から member を複数指定できます。
関連コマンド ZREMRANGEBYSCORE, ZREMRANGEBYLEX, ZREMRANGEBYRANK, SREM, HDEL
Clients for Java Jedis, Lettuce, Redisson
Clients for C Hiredis

<< ZMSCORE ZREM ZRM >>

Email 返事がかかってなれば、メールでお知らせします。