[ https://issues.apache.org/jira/browse/SOLR-11629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17790764#comment-17790764 ]
Dario Viva commented on SOLR-11629: ----------------------------------- [~varun] I know I am kind of late to the party, but haven't the Java language authors made it very clear, that Optional should only ever be used as a return type. Wouldn’t it make more sense for the “chroot” to be of type String. > CloudSolrClient.Builder should accept a zk host > ----------------------------------------------- > > Key: SOLR-11629 > URL: https://issues.apache.org/jira/browse/SOLR-11629 > Project: Solr > Issue Type: Bug > Reporter: Varun Thacker > Assignee: Jason Gerlowski > Priority: Major > Fix For: 7.3, 8.0 > > Attachments: SOLR-11629.patch, SOLR-11629.patch, SOLR-11629.patch, > SOLR-11629.patch, SOLR-11629.patch > > > Today we need to create an empty builder and then wither pass zkHost or > withSolrUrl > {code} > SolrClient solrClient = new > CloudSolrClient.Builder().withZkHost("localhost:9983").build(); > solrClient.request(updateRequest, "gettingstarted"); > {code} > 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 > {code} > HttpSolrClient client = new > HttpSolrClient.Builder("http://localhost:8983/solr").build(); > client.request(updateRequest, "techproducts"); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org