use of org.apache.solr.client.solrj.impl.LBHttpSolrClient.Builder in project lucene-solr by apache.
the class LBHttpSolrClientBuilderTest method testDefaultsToBinaryResponseParserWhenNoneProvided.
@Test
public void testDefaultsToBinaryResponseParserWhenNoneProvided() {
try (LBHttpSolrClient createdClient = new Builder().withBaseSolrUrl(ANY_BASE_SOLR_URL).build()) {
final ResponseParser usedParser = createdClient.getParser();
assertTrue(usedParser instanceof BinaryResponseParser);
}
}
use of org.apache.solr.client.solrj.impl.LBHttpSolrClient.Builder in project lucene-solr by apache.
the class HttpShardHandlerFactory method createLoadbalancer.
protected LBHttpSolrClient createLoadbalancer(HttpClient httpClient) {
LBHttpSolrClient client = new Builder().withHttpClient(httpClient).build();
client.setConnectionTimeout(connectionTimeout);
client.setSoTimeout(soTimeout);
return client;
}
Aggregations