antirez/redis — pull request #1928 by michael-grunder (2014-08-11 20:32:43+00:00)
Title: ZFILTERSTORE

This commit adds the ZFILTERSTORE command, which works like ZUNIONSTORE
except that the command takes an additional "template" argument, and only
values that are in the template are aggregated.

The command allows for a much faster way to rank a subset of members
across a series of input sets, and can replace the following pattern:

ZINTERSTORE tmpset1 2 template input1
ZINTERSTORE tmpset2 2 template input2
ZINTERSTORE tmpset3 2 template input3
ZUNIONSTORE outset 3 tmpset1 tmpset2 tmpset3

The prototype of the command is like so:

ZFILTERSTORE