You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2007/02/22 03:19:19 UTC
svn commit: r510346 -
/lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb
Author: ehatcher
Date: Wed Feb 21 18:19:18 2007
New Revision: 510346
URL: http://svn.apache.org/viewvc?view=rev&rev=510346
Log:
add timeout option to Solr::Connection. Net::HTTP has a default of 30 seconds, but a large index requires much longer than that for an optimize, for example
Modified:
lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb
Modified: lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb?view=diff&rev=510346&r1=510345&r2=510346
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb Wed Feb 21 18:19:18 2007
@@ -42,6 +42,8 @@
# Not actually opening the connection yet, just setting up the persistent connection.
@connection = Net::HTTP.new(@url.host, @url.port)
+
+ @connection.read_timeout = opts[:timeout] if opts[:timeout]
end
# add a document to the index. you can pass in either a hash