Since the app is 100% based on user-generated content, we had to implement user/content blocking and/or reporting. What does content mean? A story or an entry.
How does a search look like? Let's say it searches all stories and all entries by a keyword. But the blocking comes in and pretty much kicks you in the face.
Why? Well, because, on top of the obvious "Exclude a blocked story/entry/user?" you also have to take into account if the creator of a story/entry has blocked you.
And all of these have to be carefully tailored in an optimized (ha!) query, that's also easy to understand when reading it 3 months later.
I hope this won't blow up 😞