Redis autocomplete

2019-01-21 14:27发布

How can I implement an autocomplete using redis?

Say for example I have an array ["alfred","joel","jeff","addick"]. When I type a I get ["alfred", "addick"]

I hope you get the point. How can I implement this using redis commands efficiently(if possible but I think it is). It would be great if I could get some simple commands I can try out via telnet to mimic this behaviour.

Thanks

P.S: Merry x-mas to all of you :)

7条回答
别忘想泡老子
2楼-- · 2019-01-21 15:05

[Yes, 2 years after the question was posted, but nonetheless relevant]

On the the Redis website, there is a full tutorial (in Ruby):

Auto Complete with Redis

查看更多
登录 后发表回答