diff --git a/tika-pipes/tika-emitters/tika-emitter-solr/src/main/java/org/apache/tika/pipes/emitter/solr/SolrEmitter.java b/tika-pipes/tika-emitters/tika-emitter-solr/src/main/java/org/apache/tika/pipes/emitter/solr/SolrEmitter.java index d5655ddd90..4b17ee64f1 100644 --- a/tika-pipes/tika-emitters/tika-emitter-solr/src/main/java/org/apache/tika/pipes/emitter/solr/SolrEmitter.java +++ b/tika-pipes/tika-emitters/tika-emitter-solr/src/main/java/org/apache/tika/pipes/emitter/solr/SolrEmitter.java @@ -326,9 +326,9 @@ public void initialize(Map params) throws TikaConfigException { .build(); } else { - solrClient = new LBHttpSolrClient.Builder().withConnectionTimeout(connectionTimeout) - .withSocketTimeout(socketTimeout).withHttpClient(httpClientFactory.build()) - .withBaseSolrUrls(solrUrls.toArray(new String[]{})).build(); + solrClient = new LBHttpSolrClient.Builder().withConnectionTimeout(connectionTimeout, TimeUnit.MILLISECONDS) + .withSocketTimeout(socketTimeout, TimeUnit.MILLISECONDS).withHttpClient(httpClientFactory.build()) + .withBaseEndpoints(solrUrls.toArray(new String[]{})).build(); } }