PFADD key element [element …]

    Time complexity: O(1) to add every element.

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    If the approximated cardinality estimated by the HyperLogLog changed after executing the command, returns 1, otherwise 0 is returned. The command automatically creates an empty HyperLogLog structure (that is, a Redis String of a specified length and with a given encoding) if the specified key does not exist.

    To call the command without elements but just the variable name is valid, this will result into no operation performed if the variable already exists, or just the creation of the data structure if the key does not exist (in the latter case 1 is returned).

    Integer reply, specifically:

    *Examples

    redis> PFADD hll a b c d e f g

      redis>