Saturday, 18 April 2015

PFMERGE destkey sourcekey1 sourcekey2 ... sourcekeyN

Syntax
PFMERGE destkey sourcekey1 sourcekey2 ... sourcekeyN

Merge multiple HyperLogLog(sourcekey1 sourcekey2 ... sourcekeyN) values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

 
127.0.0.1:6379> pfadd sample 1 2 3 4 5 
(integer) 1 
127.0.0.1:6379> pfadd example 6 7 8 9 
(integer) 1 
127.0.0.1:6379> pfcount sample example 
(integer) 9 
127.0.0.1:6379> pfcount sample 
(integer) 5 
127.0.0.1:6379> pfcount example 
(integer) 4 
127.0.0.1:6379> keys * 
1) "sample" 
2) "example" 
127.0.0.1:6379> pfmerge dest sample example 
OK 
127.0.0.1:6379> pfcount dest 
(integer) 9 
127.0.0.1:6379> 

 
Prevoius                                                 Next                                                 Home

No comments:

Post a Comment