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.
  }}} 
  
  

Reply via email to