mirror of https://github.com/apache/lucene.git
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:
parent
57d6f91ad6
commit
57404e1500
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue