README.rdoc in rsolr-0.11.0 vs README.rdoc in rsolr-0.12.0

- old
+ new

@@ -11,10 +11,11 @@ * {RSolr Google Group}[http://groups.google.com/group/rsolr] * {RSolr::Ext}[http://github.com/mwmitchell/rsolr-ext] -- an extension kit for RSolr * {Sunspot}[http://github.com/outoftime/sunspot] -- an awesome Solr DSL, built with RSolr * {Blacklight}[http://blacklightopac.org] -- a next generation Library OPAC, built with RSolr * {solr-ruby}[http://wiki.apache.org/solr/solr-ruby] -- the original Solr Ruby Gem +* {java_bin}[http://github.com/kennyj/java_bin] -- Provides javabin/binary parsing for Ruby == Simple usage: require 'rubygems' require 'rsolr' solr = RSolr.connect :url=>'http://solrserver.com' @@ -25,32 +26,9 @@ # send a request to a custom request handler; /catalog response = rsolr.request '/catalog', :q=>'*:*' # alternative to above: response = rsolr.catalog :q=>'*:*' - -To use a DirectSolrConnection (no http) in JRuby: - - # "apache-solr" should be a path to a solr build. - Dir['apache-solr/dist/*.jar'].each{|jar|require jar} - Dir['apache-solr/lib/*.jar'].each{|jar|require jar} - - opts = {:home_dir=>'/path/to/solr/home'} - - # note: you'll have to close the direct connection yourself unless using a block. - solr = RSolr.direct_connect(opts) - solr.select :q=>'*:*' - solr.connection.close - - # OR using a block for automatic connection closing: - RSolr.direct_connect opts do |solr| - solr.select :q=>'*:*' - end - -In general, the direct connection is less than ideal in most applications. You'll be missing out on Http caching, and it'll be impossible to do distributed searches. The direct connection could possibly come in handy though, for quickly indexing large numbers of documents. - -For more information about DirectSolrConnection, see the {API}[http://lucene.apache.org/solr/api/org/apache/solr/servlet/DirectSolrConnection.html]. - == Querying Use the #select method to send requests to the /select handler: response = solr.select({ :q=>'washington', \ No newline at end of file