For the project I'm working on, I show the tweets that I receive from the Streaming Stream API. Before displaying a tweet, I need to check each word for a list of blacklisted words.
Currently, I have all the blacklists in the MongoDB collection.
The obvious way that comes to my mind is to blow up a tweet to get every word, and then for every word in a tweet, check if the blacklist collection contains that word.
However, this would mean ~ 20 database tweet requests that I am showing.
Is there a better way to do this?
source share