Auto Complete with Redis (2010)
oldblog.antirez.com
oldblog.antirez.com
Also you may want to check the RediSearch module from Redis Labs. It's AGPL and not part of the Redis project itself but it's very powerful. http://redisearch.io
BTW using vanilla Redis with lexicographic ranges some time ago I published a demo where I indexed the whole Linux kernel code using a small amount of memory and performing many tens of thousands ranges per second. There are other systems out there that are designed just for search but in certain low latency cases Redis can be hard to beat, also if you want to change the index in real time.
Are you able to put a similar warning at the top of the article? Maybe something like, "[The following info is deprecated but is left for historical purposes. ... Please check the following: https://redis.io/topics/indexes]"
Yes it’s more work to setup but the maintenance and tweaking will be waaaay easier and more timely in the long run.
https://sqlite.org/fts3.html (and also https://sqlite.org/fts5.html) -- make sure to use the a stemming tokenizer as well.
Why SQLite might be a good idea for your project/small service: https://www.sqlite.org/whentouse.html
SQLite’s is a lot more limited in performance, and a lot less usable.
SQLite offers a fraction of the robustness of Postgres, but that difference is not necessarily reflected in the correctness/speed of a simple full text search capability meant to support auto-complete (as in the article). Unfortunately I don't have number to back up this assertion, but I'd be very surprised if SQLite FTS was even 10x slower, maybe someone should do that comparison, I'll put it down and make a humble attempt at comparing these two approaches someday.
Due to SQLite's exclusive locking mechanism, this causes actual issues with concurrent writes and reads.
Incidentally, even that's not even an issue anymore, if you enable SQLite's write-ahead logging support:
That all said, the comments above on redisearch and and lexicographic ranges are worth having a look at. If you already have redis in your stack and can't/don't want to add another tech and you don't need anything particularly advanced, that could be a better option than grabbing a lucene backed sledgehammer.