You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2023/01/02 15:34:33 UTC

[GitHub] [solr] dsmiley commented on a diff in pull request #1256: SOLR-10466: setDefaultCollection should be deprecated in favor of SolrClientBuilder methods

dsmiley commented on code in PR #1256:
URL: https://github.com/apache/solr/pull/1256#discussion_r1060094911


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -257,6 +259,12 @@ public Builder setRetryExpiryTime(int secs) {
       return this;
     }
 
+    /** Sets the default collection for request. */
+    public Builder setDefaultCollection(String collection) {

Review Comment:
   `with`



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java:
##########
@@ -328,6 +330,12 @@ public Builder withParallelUpdates(boolean parallelUpdates) {
       return this;
     }
 
+    /** Sets the default collection for request. */
+    public Builder setDefaultCollection(String collection) {

Review Comment:
   `with`



##########
solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java:
##########
@@ -2669,6 +2669,18 @@ public static CloudSolrClient getCloudSolrClient(String zkHost) {
         .build();
   }
 
+  /**
+   * This method <i>may</i> randomize unspecified aspects of the resulting SolrClient. Tests that do
+   * not wish to have any randomized behavior should use the {@link
+   * org.apache.solr.client.solrj.impl.CloudSolrClient.Builder} class directly
+   */
+  public static CloudSolrClient getCloudSolrClient(String zkHost, String defaultCollection) {

Review Comment:
   I honestly don't like these methods.  In a sense it hides a builder, -- it's as if we don't actually like builders and instead we like many overloaded methods that takes all sorts of parameters that are hard to decipher at the call site.  Yuck!  We should should want to embrace builders!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org