CMS.MERGE

Syntax
CMS.MERGE destination numKeys source [source ...] [WEIGHTS weight
  [weight ...]]
Available in:
Redis Stack / Bloom 2.0.0
Time complexity:
O(n) where n is the number of sketches

Merges several sketches into one sketch. All sketches must have identical width and depth. Weights can be used to multiply certain sketches. Default weight is 1.

Parameters:

  • dest: The name of destination sketch. Must be initialized.
  • numKeys: Number of sketches to be merged.
  • src: Names of source sketches to be merged.
  • weight: Multiple of each sketch. Default =1.

Return

Simple string reply - OK if executed correctly, or [] otherwise.

Examples

redis> CMS.MERGE dest 2 test1 test2 WEIGHTS 1 3
OK

Rate this page