diff options
author | Tim Hinderliter <tim@opscode.com> | 2010-11-08 15:04:21 -0800 |
---|---|---|
committer | Tim Hinderliter <tim@opscode.com> | 2010-11-08 15:04:21 -0800 |
commit | d0c0df5c91a19a069ec98a9b2dbfc330e2b3f746 (patch) | |
tree | f14f2e1422a15f43060ebc9d3b973bf07eb5cd33 | |
parent | 0521e4e3aade30711dee590ffbbd156f1ec9a4e3 (diff) | |
download | chef-d0c0df5c91a19a069ec98a9b2dbfc330e2b3f746.tar.gz |
changes to search controller to accomodate SOLR constructor changes,
cribbed from platform
-rw-r--r-- | chef-server-api/app/controllers/search.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chef-server-api/app/controllers/search.rb b/chef-server-api/app/controllers/search.rb index d29ab67a1e..19778c03e0 100644 --- a/chef-server-api/app/controllers/search.rb +++ b/chef-server-api/app/controllers/search.rb @@ -41,11 +41,12 @@ class Search < Application end query = Chef::Solr::Query.new(Chef::Config[:solr_url]) - params[:q] ||= "*:*" params[:sort] ||= nil - params[:start] ||= 0 params[:rows] ||= 20 - objects, start, total = query.search(params[:id], params[:q], params[:sort], params[:start], params[:rows]) + + params[:type] = params[:id] + objects, start, total = query.search(params) + display({ "rows" => objects, "start" => start, |