HyperLogLog expression helpers.
Summary
Functions
Adds element expressions to an HLL expression value.
Returns [index_bit_count, min_hash_bit_count] for the HLL value.
Returns the estimated cardinality.
Returns the estimated cardinality of the intersection of bin and hlls.
Returns an estimated similarity score for bin and hlls.
Returns an HLL expression containing the union of bin and hlls.
Returns the estimated cardinality of the union of bin and hlls.
Creates or resets an HLL expression value.
Returns whether the HLL value may contain every element in elements.
Types
@type opts() :: [ {:flags, atom() | [atom()] | non_neg_integer() | {:raw, non_neg_integer()}} ]
HyperLogLog expression modify options.
Supported key:
:flags- HLL write flags. Defaults to:default.
@type t() :: Aerospike.Exp.t()
Opaque server-side expression.
Functions
@spec add( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Adds element expressions to an HLL expression value.
elements must evaluate to a list. Supports flags:.
@spec describe(Aerospike.Exp.t()) :: t()
Returns [index_bit_count, min_hash_bit_count] for the HLL value.
@spec get_count(Aerospike.Exp.t()) :: t()
Returns the estimated cardinality.
@spec get_intersect_count(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
Returns the estimated cardinality of the intersection of bin and hlls.
@spec get_similarity(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
Returns an estimated similarity score for bin and hlls.
@spec get_union(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
Returns an HLL expression containing the union of bin and hlls.
@spec get_union_count(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
Returns the estimated cardinality of the union of bin and hlls.
@spec init(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()
Creates or resets an HLL expression value.
index_bit_count and min_hash_bit_count default to Exp.int(-1), asking
the server to use its defaults. Supports flags:.
@spec may_contain(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
Returns whether the HLL value may contain every element in elements.