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 Wed, 02 Mar 2016 20:31:18 GMT


Jason Gerlowski commented on SOLR-8097:

bq. we need to continue testing the current SolrJ implementation too

Does RandomizedSolrClientCreator address your concerns there?  I wrote it with that in mind,
but I might've misinterpretted what you were asking for.  It does a coin flip using each test's
Random object, and does builder or non-builder SolrClient creation based on the result.  I
thought that was what you were suggested having a way to "optionally pick between builder
and existing way" in your comment above.

I'm happy to back out the changes to all the tests if you aren't happy with a coin-flip-creation
approach here.  In that case, should I only be changing a subset of the tests?

> Implement a builder pattern for constructing a Solrj client
> -----------------------------------------------------------
>                 Key: SOLR-8097
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrJ
>    Affects Versions: master
>            Reporter: Hrishikesh Gadre
>            Assignee: Anshum Gupta
>            Priority: Minor
>         Attachments: 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

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

View raw message