mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
remove redundant setting of timeout for remoteinstance
and replace depreciated updatesolrclient instantiation with recommended builder
This commit is contained in:
parent
f01aac31fd
commit
d5a75537e4
|
@ -306,12 +306,14 @@ public class RemoteInstance implements SolrInstance {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user