Permalink
Browse files

remove redundant setting of timeout for remoteinstance

and replace depreciated updatesolrclient instantiation with recommended builder
  • Loading branch information...
reger24 committed Nov 26, 2017
1 parent f01aac3 commit d5a75537e4e1d08328097af8f7ff580c17d04a6d
Showing with 4 additions and 2 deletions.
  1. +4 −2 source/net/yacy/cora/federate/solr/instance/RemoteInstance.java
@@ -306,12 +306,14 @@ public SolrClient getServer(String name) {
s = new ConcurrentUpdateSolrClient(solrServerURL, this.client, 10, Runtime.getRuntime().availableProcessors());
} else {
ConcurrentLog.info("RemoteSolrConnector", "connecting Solr with url : " + this.solrurl + name);
s = new ConcurrentUpdateSolrClient(u.toString(), queueSizeByMemory(), Runtime.getRuntime().availableProcessors());
ConcurrentUpdateSolrClient.Builder builder = new ConcurrentUpdateSolrClient.Builder(u.toString());
builder.withQueueSize(queueSizeByMemory());
builder.withThreadCount(Runtime.getRuntime().availableProcessors());
s = builder.build();
}
//s.setAllowCompression(true);
s.setSoTimeout(this.timeout);
//s.setMaxRetries(1); // Solr-Doc: No more than 1 recommended (depreciated)
s.setSoTimeout(this.timeout);
this.server.put(name, s);
return s;
}

0 comments on commit d5a7553

Please sign in to comment.