Creates a union or intersection of N sorted sets given by keys k1 through kN, and stores it at
dstkey. It is mandatory to provide the number of input keys N, before passing the input keys
and the other (optional) arguments.
<p>
As the terms imply, the {@link #zinterstore(const(ubyte)[], const(ubyte)[]...) ZINTERSTORE} command requires an
element to be present in each of the given inputs to be inserted in the result. The {@link
#zunionstore(const(ubyte)[], const(ubyte)[]...) ZUNIONSTORE} command inserts all elements across all inputs.
<p>
Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means
that the score of each element in the sorted set is first multiplied by this weight before
being passed to the aggregation. When this option is not given, all weights default to 1.
<p>
With the AGGREGATE option, it's possible to specify how the results of the union or
intersection are aggregated. This option defaults to SUM, where the score of an element is
summed across the inputs where it exists. When this option is set to be either MIN or MAX, the
resulting set will contain the minimum or maximum score of an element across the inputs where
it exists.
<p>
<b>Time complexity:</b> O(N) + O(M log(M)) with N being the sum of the sizes of the input
sorted sets, and M being the number of elements in the resulting sorted set
@see #zunionstore(const(ubyte)[], const(ubyte)[]...)
@see #zunionstore(const(ubyte)[], ZParams, const(ubyte)[]...)
@see #zinterstore(const(ubyte)[], const(ubyte)[]...)
@see #zinterstore(const(ubyte)[], ZParams, const(ubyte)[]...)
@param dstkey
@param sets
@param params
@return Integer reply, specifically the number of elements in the sorted set at dstkey
Creates a union or intersection of N sorted sets given by keys k1 through kN, and stores it at dstkey. It is mandatory to provide the number of input keys N, before passing the input keys and the other (optional) arguments. <p> As the terms imply, the {@link #zinterstore(const(ubyte)[], const(ubyte)[]...) ZINTERSTORE} command requires an element to be present in each of the given inputs to be inserted in the result. The {@link #zunionstore(const(ubyte)[], const(ubyte)[]...) ZUNIONSTORE} command inserts all elements across all inputs. <p> Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means that the score of each element in the sorted set is first multiplied by this weight before being passed to the aggregation. When this option is not given, all weights default to 1. <p> With the AGGREGATE option, it's possible to specify how the results of the union or intersection are aggregated. This option defaults to SUM, where the score of an element is summed across the inputs where it exists. When this option is set to be either MIN or MAX, the resulting set will contain the minimum or maximum score of an element across the inputs where it exists. <p> <b>Time complexity:</b> O(N) + O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set @see #zunionstore(const(ubyte)[], const(ubyte)[]...) @see #zunionstore(const(ubyte)[], ZParams, const(ubyte)[]...) @see #zinterstore(const(ubyte)[], const(ubyte)[]...) @see #zinterstore(const(ubyte)[], ZParams, const(ubyte)[]...) @param dstkey @param sets @param params @return Integer reply, specifically the number of elements in the sorted set at dstkey