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 Apache Wiki <wi...@apache.org> on 2008/08/27 16:21:09 UTC
[Solr Wiki] Update of "Solrj" by SeanTimm
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by SeanTimm:
http://wiki.apache.org/solr/Solrj
The comment on the change is:
connections settings section more complete. Prompted by SOLR-709.
------------------------------------------------------------------------------
{{{
String url = "http://localhost:8983/solr"
CommonsHttpSolrServer server = new CommonsHttpSolrServer( url );
+ server.setSoTimeout(1000); // socket read timeout
server.setConnectionTimeout(100);
server.setDefaultMaxConnectionsPerHost(100);
server.setMaxTotalConnections(100);
+ server.setFollowRedirects(false); // defaults to false
+ // allowCompression defaults to false.
+ // Server side must support gzip or deflate for this to have any effect.
+ server.setAllowCompression(true);
+ server.setMaxRetries(1); // defaults to 0. > 1 not recommended.
}}}