[ https://issues.apache.org/jira/browse/SOLR-8097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138253#comment-15138253 ]
Jason Gerlowski commented on SOLR-8097: --------------------------------------- Looks like the only remaining *Server variants are {{EmbeddedSolrServer}} (appears to only be used in tests, and the map-reduce contrib module), and {{EmbeddedTestSolrServer}} (lives in the morphline-core contrib module). My guess is that it's probably not worth writing a builder for these, since their use is restricted, and they don't really suffer from the too-many-ctor-args problem that the other SolrClients seem to. > 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: Trunk > Reporter: Hrishikesh Gadre > Priority: Minor > Attachments: 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