[ https://issues.apache.org/jira/browse/SOLR-8097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237634#comment-15237634 ]
Jason Gerlowski commented on SOLR-8097: --------------------------------------- I thought about doing that as a part of my patch, but it seemed like it might be handled best in a separate JIRA. I'd be happy to push up a patch with that change in a sub-task if it's one that people are interested in. One question I have is whether there's ever a valid use-case for changing/tweaking a SolrClient after creating it. (i.e. Does anyone ever change their RequestWriter, zkHost, collection, etc, instead of just creating a new client). I'm not implying that there is a good reason to do so, or that I'm against removing the setters (I'm all for it). (Just want to make sure, after the issue I partially caused in SOLR-8642) > Implement a builder pattern for constructing a Solrj client > ----------------------------------------------------------- > > Key: SOLR-8097 > URL: https://issues.apache.org/jira/browse/SOLR-8097 > Project: Solr > Issue Type: Improvement > Components: SolrJ > Affects Versions: master > Reporter: Hrishikesh Gadre > Assignee: Anshum Gupta > Fix For: master, 6.1 > > Attachments: SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, > SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, > SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, > SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch > > > Currently Solrj clients (e.g. CloudSolrClient) supports multiple constructors > as follows, > public CloudSolrClient(String zkHost) > public CloudSolrClient(String zkHost, HttpClient httpClient) > public CloudSolrClient(Collection<String> zkHosts, String chroot) > public CloudSolrClient(Collection<String> zkHosts, String chroot, HttpClient > httpClient) > public CloudSolrClient(String zkHost, boolean updatesToLeaders) > public CloudSolrClient(String zkHost, boolean updatesToLeaders, HttpClient > httpClient) > It is kind of problematic while introducing an additional parameters (since > we need to introduce additional constructors). Instead it will be helpful to > provide SolrClient Builder which can provide either default values or support > overriding specific parameter. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org