in case of thousand projects its not a best idea. 
Maybe do 2 queries? current_user.authorized_projects.search && Project.public.search