Making user search scoped to a group

I think the only way to do this is to find a way to whitelist some categories and do what i want on only certain categories. I know this is gonna be really hard to come around, just want a tip on where to start.