Module Hub Beta

CMS.MERGE

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”.

Examples

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

© 2017 Redis Labs, Inc. All rights reserved.