Better heuristic on when to use trigram searches

Fixes #13