No easy way. Best advice is keyword filters & using a blacklist filter.
1. Use both links within this one:
Direct instructions to eliminate porn from results
2.
Hostiles List
3. Also when searching for video or audio, using these techniques:
How to find music
4. How to recognise & ignore spam:
Virus thread: Typical virus spam file sizes - Make a note of them (click on blue link to see). I generally arrange search results via size so I can quickly see which is spam.
5. A last method is one you need to be careful about applying though. Sometimes you can be connected directly to spam ultrapeers. So going to Connection window, removing each Ultrapeer one by one. You will temporarily lose connection with each one you remove however so wait for the connection bars to return to blue or green before doing another search. Do searches after removing each one & see if search results are improved.