various algorithms for redis autocomplete