Class: SolrWrapper::Client
- Inherits:
-
Object
- Object
- SolrWrapper::Client
- Defined in:
- lib/solr_wrapper/client.rb
Overview
Solr REST API client to get status information
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#exists?(core_or_collection_name) ⇒ Boolean
Check if a core or collection exists.
-
#initialize(url) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(url) ⇒ Client
Returns a new instance of Client.
9 10 11 |
# File 'lib/solr_wrapper/client.rb', line 9 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/solr_wrapper/client.rb', line 7 def url @url end |
Instance Method Details
#exists?(core_or_collection_name) ⇒ Boolean
Check if a core or collection exists
14 15 16 |
# File 'lib/solr_wrapper/client.rb', line 14 def exists?(core_or_collection_name) collection?(core_or_collection_name) || core?(core_or_collection_name) end |