The problem is that it's not exactly keywords match. It's partial match as user is typing. For example, as user types in "foo", it needs to find words like fool, foolish, foot, footware, football etc very quickly, and as user types in the fourth letter t, it should search again and return only words like foot, footware, football...
To hash all the meaningful character combinations beforehand wouldn't be practical as the're too many.
To hash all the meaningful character combinations beforehand wouldn't be practical as the're too many.