Redis partial word match — you (auto)complete me. #redis #ruby

April 25, 2013 hrward redis autocompletion search Redis partial word match — you (auto)complete me We can use partial word matching to rapidly search strings of text such as Names, Cities, States, etc. We can do this by indexing strings into Redis sets based on partial matches of the string. The indexing process takes a string and breaks it into left-bound substrings which are placed into the appropriate Redis sets. Partial word matching movie titles In this example we’ll enable partial word matching queries of movie titles. The movie titles will be stored in plain text. The keys are simple key-value pairs that are stored with the key structure movies:id , where id is incremented: $ redis-cli get movies:1 "Bad Santa" $ redis-cli get movies:2 "Batman" $ redis-cli get movies:3 "Bad Company" The movie Batman would be decomposed into the following sets (assuming that the index...