lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Gerlowski (JIRA)" <>
Subject [jira] [Commented] (SOLR-8097) Implement a builder pattern for constructing a Solrj client
Date Mon, 08 Feb 2016 23:22:40 GMT


Jason Gerlowski commented on SOLR-8097:

Hey Shawn, thanks for the review.

I hadn't realized this JIRA was intended to cover each of the SolrClient implementations.
 The list of CloudSearchClient ctors in the description narrowed my focus; on a re-read it's
clear that was just an example.  With that in mind all your feedback makes sense to me.

I'll expand this patch out to the other SolrClients then, in a way that leverages inheritance
where possible.  Since I was focused more narrowly before, I'm also not sure what makes the
most sense with regards to also covering SolrServer.  I'll give your suggestions a shot and
check back in with a patch or an update.

> Implement a builder pattern for constructing a Solrj client
> -----------------------------------------------------------
>                 Key: SOLR-8097
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message