class SimpleSolrClient::Core
Attributes
core[R]
name[R]
Public Class Methods
new(url, core=nil)
click to toggle source
Calls superclass method
SimpleSolrClient::Client::new
# File lib/simple_solr_client/core.rb, line 26 def initialize(url, core=nil) if core.nil? components = url.gsub(%r[/\Z], '').split('/') core = components.last url = components[0..-2].join('/') end super(url) @core = core end
Public Instance Methods
update(object_to_post, response_type = nil)
click to toggle source
Send JSON to this core's update/json handler
# File lib/simple_solr_client/core.rb, line 43 def update(object_to_post, response_type = nil) post_json('update/json', object_to_post, response_type) end
url(*args)
click to toggle source
Override url
so we're now talking to the core
# File lib/simple_solr_client/core.rb, line 38 def url(*args) [@base_url, @core, *args].join('/').chomp('/') end