I'm using full-text search to search through a database of usernames (these are mostly email addresses, but not all). However, since the '_' is not considered a word breaking character, it is difficult to search for certain users.
e.g. Searching for "pancakes*" will return results for "bobby-pancakes" or "bobby@pancakes.com", but not "_bobby_robert_pancakes@email.com". I need a search that will match all of these.
To fix this, I want to treat underscores as word breaking characters like spaces or hyphens. Is there a way to update which characters break words in full text search?
Why not use the LIKE operator?
Unfortunately, we have a large database of usernames, and it's just too slow.
What about a custom dictionary?
As far as I can tell, custom dictionaries allow you to stop the word breaker from breaking certain combinations of characters, but don't allow you to introduce new breaking characters.
What about a custom word breaker?
I can't seem to find any documentation on how to create one of these.