Fix similarity function for one character-length search queries