title: Possible with lua in redis to return all key stored in a set as a list of hashes?
body: <p>I have a structure</p>
  
  <pre><code>data_type:key1 - hash
  data_type:key2 - hash
  data_type:key3 - hash
  data_type:key4 - hash
  data_type:key5 - hash
  data_type:index - set(key1, key2, key3, key4, key5)
  </code></pre>
  
  <p>Is it possible with lua in redis to build a script that would iterate over the set data_type:index and return all data_type:key*'s as a list of hashes?  I am still learning Lua as a I go so in my head I think it would work something like</p>
  
  <pre><code>collect = []
  for key_name in redis.call.smemembers('data_type:index'):
      collect.append( redis.call.smembers('data_type:' + key_name)
  return collect
  </code></pre>
  
  <p>Generally most of the index's have about 100 keys, each key is about 1KB, so this script would have a 100-120KB response size under ideal circumstances.</p>
  
  <p>And before anyone asks, the real keys look like  'some_data:status:{64 bit hex string}'  and 'some_data:index:2013:05:09' with the {64 bit hex string} being a member of the :index set.</p>