3 ms·
Even if you are doing this with redis, there are two far better methods of doing it - with lexical ranges, or with RediSearch's autocomplete, which is way more
by dvirsky 9y ago
Even if you are doing this with redis, there are two far better methods of doing it - with lexical ranges, or with RediSearch's autocomplete, which is way more powerful - uses a compact trie, has fuzzy matching with a Levenshtein automaton, scoring, payloads, etc. See http://redisearch.io/Commands/#ftsugget http://redisearch.io/Commands/#ftsugget (Full disclosure: I'm the author of that project)