pvcnt commented on code in PR #2039: URL: https://github.com/apache/solr/pull/2039#discussion_r1410398381
########## solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java: ########## @@ -129,17 +129,8 @@ public String getRequestType() { } private static void writeNumReplicas(ReplicaCount numReplicas, ModifiableSolrParams params) { - if (numReplicas.contains(Replica.Type.NRT)) { - params.add( - CollectionAdminParams.NRT_REPLICAS, String.valueOf(numReplicas.get(Replica.Type.NRT))); - } - if (numReplicas.contains(Replica.Type.TLOG)) { - params.add( - CollectionAdminParams.TLOG_REPLICAS, String.valueOf(numReplicas.get(Replica.Type.TLOG))); - } - if (numReplicas.contains(Replica.Type.PULL)) { - params.add( - CollectionAdminParams.PULL_REPLICAS, String.valueOf(numReplicas.get(Replica.Type.PULL))); + for (Replica.Type replicaType : numReplicas.keySet()) { Review Comment: I added a variant taking `SolrModifiableParams` as an argument. I would like to keep it simple for now. -- 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-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org