Redis: Implementing Auto Complete or How to build Trie on Redis
In the days the news are about instant searches and auto complete, Salvatore Sanfilippo (@antirez) shows how to use Redis sorted sets and corresponding commands (ZRANGE, ZRANK) to implement autocompletion:
The initial code in Ruby:
already got ported to Python:
As Ilya Grigorik (@igrigorik) commented, this is building a ☞ Trie with Redis.
Original title and link: Redis: Implementing Auto Complete or How to build Trie on Redis (NoSQL databases © myNoSQL)