You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Gerlowski (JIRA)" <ji...@apache.org> on 2016/02/08 17:45:40 UTC

[jira] [Commented] (SOLR-8097) Implement a builder pattern for constructing a Solrj client

    [ https://issues.apache.org/jira/browse/SOLR-8097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15137198#comment-15137198 ] 

Jason Gerlowski commented on SOLR-8097:
---------------------------------------

Hi all,

Just wanted to give this issue a little 'bump'.  If there's not much interest in this issue, that's fine with me.  Not trying to push this over other important things people are working on.  Just wanted to make sure it wasn't missed on accident.

So if you're interested in seeing this go forward and have time to take a look, please review the attached patch, and let me know what you'd like tweaked/improved in the next iteration.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org