Module: Solr::Support::ConnectionHelper

Defined in:
lib/solr/support/connection_helper.rb

Instance Method Summary collapse

Instance Method Details

#connection(path, commit: false) ⇒ Object



4
5
6
7
8
9
# File 'lib/solr/support/connection_helper.rb', line 4

def connection(path, commit: false)
  url_params = {}
  url_params[:commit] = true if commit
  url = Solr::Support::UrlHelper.solr_url(path, url_params: url_params)
  Solr::Connection.new(url)
end