lib/chef/search/query.rb in chef-11.4.4 vs lib/chef/search/query.rb in chef-11.6.0.hotfix.1
- old
+ new
@@ -29,11 +29,11 @@
class Query
attr_accessor :rest
def initialize(url=nil)
- @rest = Chef::REST.new(url ||Chef::Config[:search_url])
+ @rest = Chef::REST.new(url ||Chef::Config[:chef_server_url])
end
# Search Solr for objects of a given type, for a given query. If you give
# it a block, it will handle the paging for you dynamically.
def search(type, query="*:*", sort='X_CHEF_id_CHEF_X asc', start=0, rows=1000, &block)
@@ -51,10 +51,10 @@
[ response["rows"], response["start"], response["total"] ]
end
end
def list_indexes
- response = @rest.get_rest("search")
+ @rest.get_rest("search")
end
private
def escape(s)
s && URI.escape(s.to_s)