Sha256: d6c7fc7f6e65fe22634987201af9839e0fa0bf0e26e2365a08689ffc6e96174d
Contents?: true
Size: 1004 Bytes
Versions: 2
Compression:
Stored size: 1004 Bytes
Contents
# Pre-define the inheritance so Ruby doesn't complain # on import. require 'simple_solr/client' require 'simple_solr/schema' module SimpleSolrClient class Core < Client end end require 'simple_solr/core/admin' require 'simple_solr/core/core_data' require 'simple_solr/core/index' require 'simple_solr/core/search' class SimpleSolrClient::Core include SimpleSolrClient::Core::Admin include SimpleSolrClient::Core::CoreData include SimpleSolrClient::Core::Index include SimpleSolrClient::Core::Search attr_reader :core alias_method :name, :core def initialize(url, core) super(url) @core = core end # Override #url so we're now talking to the core def url(*args) [@base_url, @core, *args].join('/').chomp('/') end # Send JSON to this core's update/json handler def update(object_to_post, response_type = nil) post_json('update/json', object_to_post, response_type) end def schema @schema ||= SimpleSolrClient::Schema.new(self) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple_solr_client-0.1.1 | lib/simple_solr/core.rb |
simple_solr_client-0.1.0 | lib/simple_solr/core.rb |