title: RedisTemplate - hash get multiple entries by key set
body: <p>I use spring's RedisTemplate.</p>
  
  <p>I have a hash in redis.</p>
  
  <p>I want to query redis, using the template, in order to get all entries whose key in a certain set of keys.</p>
  
  <p>I noticed the method:</p>
  
  <pre><code>Map&lt;Object, Object&gt; entries = redisTemplate.opsForHash().multiGet(HASH_NAME, keySet);
  </code></pre>
  
  <p>But, unfortunately this method returns only the values, without the matching keys.</p>
  
  <p>I could also do it like this:</p>
  
  <pre><code>Map&lt;Object, Object&gt; entries = redisTemplate.opsForHash().entries(HASH_NAME);
  for(Object key : keySet){
      System.out.println(entries.get(key));
  }
  </code></pre>
  
  <p>But this means I will get all entries from redis, to my local machine, and iterate them.</p>
  
  <p>Don't I have a better way of doing this?</p>