I am looking on running a search on my database at set intervals for a list of words I consider offensive (because I am an authoritarian dictator and I hate free speech - I rule with an Iron fist).
How would I most efficiently search my database for a list of keywords? The two columns I intend to search are indexed as Fulltext.
If anyone knows of a list of offensive words that would be useful too.
A note to those who ridicule my attempts at censorship
I have will have two systems in place. The first is a report function which is checked daily by admins. The second tool to combat the dissenters is this one. All it needs to be is a word search so that the admin may check through and descide if the content is offensive or not.
Mysql won't give you the tools for an acurate search, take this sample, if you have among your words:
freedom
Since you are a dictator you don't want it, it should appear, but clever users will put fr33dom, which is the same, now you have 3 ways to dot this:
I would go for the third, since Lucene is the best choice for performing searches, and since you are looking for words I can imagine that you are dealing with text, so this might help more than you think. Lucene can help you searching words similar to freedom, but not it, there you shouldn't miss much!! And your rule is guarrantied!
There are extensions for Lucene using Zend Framework, you can find them easily in Google.
Best of luck in your dictatorial efforst!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With