Search route function