Doing the search parameters in controller