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

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@510346 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-02-22 02:19:18 +00:00
parent 57d6f91ad6
commit 57404e1500
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ class Solr::Connection
# 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