I'm just wondering whether anyone would mind giving some input on a little coding logic problem I'm trying to tackle, please.
I've got a website which uses MySQL full-text search, which is natural language based. Therefore, entering something offensive, such as "Joe Bloggs has enormous ears" will return results, even if only the term Joe Bloggs is present.
The problem is, I'm adding successful search queries to my database and then returning the ones which return the most results in a tag cloud. It's therefore now possible, since switching to full-text searching, to make ridiculous, obscene or amusing phrases appear in the tag cloud!
I'm thinking of using explode() to break up the search term to single keywords, but even then, there's still potential for naughty words to appear. Apart from using a bad word filter, does anyone have any other ideas of how I can solve this? Apart from the non elegant solution of doing an additional SQL query with "WHERE stuff = '$query'" I can't really think of a workaround.
Any ideas anyone?
Thanks!