Class: ActsAsSolr::Post
- Inherits:
-
Object
- Object
- ActsAsSolr::Post
- Defined in:
- lib/websolr_acts_as_solr.rb
Class Method Summary collapse
Class Method Details
.execute(request, core = nil) ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/websolr_acts_as_solr.rb', line 41 def self.execute(request, core = nil) begin connection = Solr::Connection.new(ENV["WEBSOLR_URL"]) return connection.send(request) rescue Exception => e STDERR.puts "Couldn't connect to the Solr server at #{ENV["WEBSOLR_URL"]}. #{$!}\n" + "Request: #{request.inspect}" false end end |