lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Bignoli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-8097) Implement a builder pattern for constructing a Solrj client
Date Mon, 12 Sep 2016 15:42:20 GMT

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

Perrin Bignoli commented on SOLR-8097:
--------------------------------------

Why is the the visibility of the following constructor in CloudSolrClient:

     private CloudSolrClient(Collection<String> zkHosts, String chroot, HttpClient httpClient,
LBHttpSolrClient lbSolrClient,
                                           boolean updatesToLeaders, boolean directUpdatesToLeadersOnly)

set to private and not protected?

> 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: 6.0
>            Reporter: Hrishikesh Gadre
>            Assignee: Anshum Gupta
>             Fix For: 6.2, master (7.0)
>
>         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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message