Description
Today we need to create an empty builder and then wither pass zkHost or withSolrUrl
SolrClient solrClient = new CloudSolrClient.Builder().withZkHost("localhost:9983").build(); solrClient.request(updateRequest, "gettingstarted");
What if we have two constructors , one that accepts a zkHost and one that accepts a SolrUrl .
The advantages that I can think of are:
- It will be obvious to users that we support two mechanisms of creating a CloudSolrClient . The SolrUrl option is cool and applications don't need to know about ZooKeeper and new users will learn about this . Maybe our example's on the ref guide should use this?
- Today people can set both zkHost and solrUrl but CloudSolrClient can only utilize one of them
HttpClient's Builder accepts the host
HttpSolrClient client = new HttpSolrClient.Builder("http://localhost:8983/solr").build(); client.request(updateRequest, "techproducts");
Attachments
Attachments
Issue Links
- is required by
-
SOLR-15608 Remove deprecations from solrj clients
- Closed