Class: SimpleSolrClient::Core
- Defined in:
- lib/simple_solr_client/core.rb,
lib/simple_solr_client/core.rb
Defined Under Namespace
Modules: Admin, CoreData, Index, Search
Instance Attribute Summary collapse
-
#core ⇒ Object
(also: #name)
readonly
Returns the value of attribute core.
Attributes included from CoreData
Attributes inherited from Client
Instance Method Summary collapse
-
#initialize(url, core) ⇒ Core
constructor
A new instance of Core.
- #schema ⇒ Object
-
#update(object_to_post, response_type = nil) ⇒ Object
Send JSON to this core’s update/json handler.
-
#url(*args) ⇒ Object
Override #url so we’re now talking to the core.
Methods included from Search
Methods included from Index
Methods included from CoreData
#config_file, #core_data_hash, #data_dir, #default?, #index, #instance_dir, #last_modified, #number_of_documents, #schema_file
Methods included from Admin
#commit, #optimize, #ping, #reload, #unload, #up?
Methods inherited from Client
#_get, #_post_json, #cores, #get, #new_core, #post_json, #raw_get_content, #temp_core, #temp_core_dir_setup, #top_level_url, #unload_temp_cores
Constructor Details
#initialize(url, core) ⇒ Core
Returns a new instance of Core.
28 29 30 31 |
# File 'lib/simple_solr_client/core.rb', line 28 def initialize(url, core) super(url) @core = core end |
Instance Attribute Details
#core ⇒ Object (readonly) Also known as: name
Returns the value of attribute core.
25 26 27 |
# File 'lib/simple_solr_client/core.rb', line 25 def core @core end |
Instance Method Details
#schema ⇒ Object
44 45 46 |
# File 'lib/simple_solr_client/core.rb', line 44 def schema @schema ||= SimpleSolrClient::Schema.new(self) end |
#update(object_to_post, response_type = nil) ⇒ Object
Send JSON to this core’s update/json handler
40 41 42 |
# File 'lib/simple_solr_client/core.rb', line 40 def update(object_to_post, response_type = nil) post_json('update/json', object_to_post, response_type) end |
#url(*args) ⇒ Object
Override #url so we’re now talking to the core
35 36 37 |
# File 'lib/simple_solr_client/core.rb', line 35 def url(*args) [@base_url, @core, *args].join('/').chomp('/') end |