Sha256: f51621e9cdf40775cfa29a789adc312457cf6b4f51b798d49297368f10048922

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

= rsolr-direct
rsolr-direct enhances the RSolr core library by adding the ability to connect to Solr directly, using JRuby, sans http. Hotdog!

= How
Check out the specs to see the various connection methods. Overview below...

==Using :solr_home
  require 'rsolr-direct'
  Dir['/path/to/solr/distribution/lib/*.jar', '/path/to/solr/distribution/dist/*.jar'].each do |jar|
    require jar
  end
  connection = RSolr.connect :solr_home => '/absolute/path/to/solr/home'

==Using a Java::OrgApacheSolrCore::SolrCore instance
  require 'rsolr-direct'
  Dir['/path/to/solr/distribution/lib/*.jar', '/path/to/solr/distribution/dist/*.jar'].each do |jar|
    require jar
  end
  core = org.apache.solr.core.SolrCore.new( nil, solr_data_path, solr_config, index_schema, dcore)
  connection = RSolr.connect core

==Using a Java::OrgApacheSolrServlet::DirectSolrConnection
  require 'rsolr-direct'
  Dir['/path/to/solr/distribution/lib/*.jar', '/path/to/solr/distribution/dist/*.jar'].each do |jar|
    require jar
  end
  dc = org.apache.solr.servlet.DirectSolrConnection.new(solr_home_path, solr_data_path, nil)
  connection = RSolr.connect dc

= Why
Using a direct connection to Solr can speed up indexing. How much faster? I have no idea yet. Numbers to come?

== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a future version unintentionally.
* Commit, do not mess with rakefile, version, or history
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 Matt Mitchell. See LICENSE for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rsolr-direct-0.0.0 README.rdoc