Module Hub Beta


destkey numkeys key [key ...] [WEIGHTS weight [weight ...]]

Merges numkeys of key into destkey. By default, destkey holds the sum of the sketches associated with the specified key, where all key should exist and have the same width and depth. Like Redis’ builtin ZUNIONSTORE and ZINTERSTORE commands, it is possible to weight each sketch using the WEIGHTS option.

Return Value

Simple String: “OK”.


redis> CMS.INCRBY counter1 foo 1 bar 10 baz 42
redis> CMS.INCRBY counter2 foo 100 bar 91 baz 42
redis> CMS.MERGE totals 2 counter1 counter2
redis> CMS.QUERY totals foo
(integer) 101

© 2017 Redis Labs, Inc. All rights reserved.