title: how to use redis scan in cluster enviroment?
body: <p>i am useing spring redisTemplate and redis scan</p>
  
  <p>it works find in condition of single node. </p>
  
  <p>but  in cluster enviroment it could not work</p>
  
  <p>i can't get a data.</p>
  
  <p>is there way to get a scan data in clust enviroment?</p>
  
  <p>here is my spring redisTemplate code.</p>
  
  <pre><code>        //String key="products:aa";
          //String key="products:aac";
          //String key="products:ab";
          //String key="products:ac";
  
  
          String workKey="products:aa*";
          ScanOptions options = ScanOptions.scanOptions().match(workKey).count(100).build();
  
          ScanOptions options1 = ScanOptions.scanOptions().build();
          RedisConnectionFactory factory = redisTemplate.getConnectionFactory();
          RedisConnection conn = factory.getConnection();
          Cursor&lt;byte[]&gt; cursor = conn.scan(options);
          List&lt;Product&gt; result = new ArrayList&lt;Product&gt;();
          while(cursor.hasNext()){
              String key=new String((byte[]) cursor.next());
              Product pa=getById(key.replace("products:",""));
              result.add(pa);
          }
  
          //result 
          //String key="products:aa";
          //String key="products:aac";
  </code></pre>