Most spiritual texts talk of the dangers of following desires, and avoiding something is almost the same as following one's desires. The degree of difference is in how you look, either toward what you want, or away from what you don't want.
Unfortunately, as I go thru life I realise the spiritual texts are probably right and that giving into desires leads to more selfishness, which leads to giving into more desires... a never-ending cycle.
So I would dispute the wisdom in 'filtering' out undesirables, and realise that we're all on this rock, and being selfish leads nowhere but different peoples being unable to communicate and relate.
It's better to learn acceptance, and if something comes your way that you don't like, then try and learn why it is so & why you react so. Asking "why?" Is a far more powerful concept than 'filtering'.