RSolr::Cloud
A RSolr's connection adopter supporting SolrCloud.
Installation
Add this line to your application's Gemfile:
gem 'rsolr-cloud'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rsolr-cloud
Example
require 'zk'
require 'rsolr/cloud'
zk = ZK.new('localhost:2181,localhost:2182,localhost:2183')
cloud_connection = RSolr::Cloud::Connection.new(zk)
solr_client = RSolr::Client.new(cloud_connection,
read_timeout: 60,
open_timeout: 60)
response = solr.get('select', collection: 'collection1', params: {q: '*:*'})
Contributing
- Fork it ( https://github.com/[my-github-username]/rsolr-cloud/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Development
To install gems which are necessary for development and testing:
$ bundle install
To run the test suite:
$ rake
The default rake task contains RuboCop and RSpec. Each task can be run separately:
$ rake rubocop
$ rake spec