Pull search into a controller