Use clearer variable names

Replace `r` with `result`, and use the `params` hash instead of
assigning request.query_parameters to `qp`, to comply with the style
guide and be more readable.  Use @search_term in search_params hash
instead of params[:q], to reduce duplication of the parameter name
holding the search string.