As far as I understand it, the algorithm for autocomplete matching is non-trivial and involves some design decision trade-offs; there’s no way to make it work for every kind of search.
See here for another discussion on fuzzy matching: Improve fuzzy search algorithm for better suggestions