title: How to imitate autocomplete search with Redis ZRANGEBYLEX?
body: <p>I'm trying to make a simple autocomplete system much like the demo here: <a href="http://autocomplete.redis.io/">http://autocomplete.redis.io/</a> but for some reason I can't get the <code>ZRANGEBYLEX</code> to return the right results. Here's what I'm doing on the Redis CLI:</p>
  
  <pre><code>&gt; zadd autocomplete 0 one 0 two 0 three 0 four 0 five 0 six 0 seven 0 eight 0 nine 0 ten 0 eleven 0 twelve 0 thirteen 0 fourteen 0 fifteen
  </code></pre>
  
  <p>My set looks good:</p>
  
  <pre><code>&gt; zrangebylex autocomplete - +
  1) "eight"
  2) "eleven"
  3) "fifteen"
  4) "five"
  5) "four"
  6) "fourteen"
  7) "nine"
  8) "one"
  9) "seven"
  10) "six"
  11) "ten"
  12) "thirteen"
  13) "three"
  14) "twelve"
  15) "two"
  </code></pre>
  
  <p>And if I use <code>ZRANGEBYLEX</code> like this the result makes sense:</p>
  
  <pre><code>zrangebylex autocomplete [e [eight
  1) "eight"
  </code></pre>
  
  <p>But if I want to get all items in the set that <em>start</em> with an "e" I try this (which is very similar to what the autocomplete demo shows) but it doesn't return the right results:</p>
  
  <pre><code>&gt; zrangebylex autocomplete [e [e(0xff)
  (empty list or set)
  </code></pre>
  
  <p>What must one use as params to the <code>ZRANGEBYLEX</code> command in order for it to match any strings beginning with "e" and anything else afterwards?</p>