Tuesday, September 14, 2010

Auto Complete with Redis & Java

Salvatore ( @antirez Redis creator ) recently wrote a nice article on implementing auto completion using Redis Set. Since we use redis at lifeblob and we have been thinking of enabling auto complete for some search options,  I came up with a java equivalent. You can grab it from github.

Sample usage:

Note that I am using Jedis java library since that looks like the only java based redis library that supports ZRank.