Module: SimpleSolrClient::Core::Admin
- Included in:
- SimpleSolrClient::Core
- Defined in:
- lib/simple_solr_client/core/admin.rb
Instance Method Summary collapse
-
#commit ⇒ Object
Send a commit command.
-
#optimize ⇒ Object
Send an optimize command.
- #ping ⇒ Object
-
#reload ⇒ Object
Reload the core (for when you’ve changed the schema, solrconfig, synonyms, etc.) Make sure to mark the schema as dirty!.
-
#unload ⇒ Object
Unload the current core and delete all its files.
-
#up? ⇒ Boolean
Is the server up (and responding to a ping?).
Instance Method Details
#commit ⇒ Object
Send a commit command
18 19 20 21 |
# File 'lib/simple_solr_client/core/admin.rb', line 18 def commit update({'commit' => {}}) self end |
#optimize ⇒ Object
Send an optimize command
25 26 27 28 |
# File 'lib/simple_solr_client/core/admin.rb', line 25 def optimize update({"optimize" => {}}) self end |
#ping ⇒ Object
2 3 4 |
# File 'lib/simple_solr_client/core/admin.rb', line 2 def ping get('admin/ping') end |
#reload ⇒ Object
Reload the core (for when you’ve changed the schema, solrconfig, synonyms, etc.) Make sure to mark the schema as dirty!
33 34 35 36 37 |
# File 'lib/simple_solr_client/core/admin.rb', line 33 def reload get('admin/cores', {:force_top_level_url => true, :core => core, :action => 'RELOAD'}) @schema = nil self end |
#unload ⇒ Object
Unload the current core and delete all its files
41 42 43 |
# File 'lib/simple_solr_client/core/admin.rb', line 41 def unload get('admin/cores', {:force_top_level_url => true, :core => core, :action => 'UNLOAD', :deleteInstanceDir => true}) end |
#up? ⇒ Boolean
Is the server up (and responding to a ping?)
8 9 10 11 12 13 14 |
# File 'lib/simple_solr_client/core/admin.rb', line 8 def up? begin ping.status == 'OK' rescue false end end |