make sure session[:search] is defined before we use it