Class: SolrWrapper::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/solr_wrapper/client.rb

Overview

Solr REST API client to get status information

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#urlObject (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

Returns:

  • (Boolean)


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